gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r33021 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r33021 - gnunet/src/mesh
Date: Thu, 10 Apr 2014 13:23:32 +0200

Author: bartpolot
Date: 2014-04-10 13:23:32 +0200 (Thu, 10 Apr 2014)
New Revision: 33021

Modified:
   gnunet/src/mesh/gnunet-service-mesh_peer.c
Log:
- don't cancel a connection's destroy message when destroying a connection and 
canceling all its traffic. since the connection will be freed, remove the 
connection pointer instead

Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-04-10 11:23:31 UTC (rev 
33020)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-04-10 11:23:32 UTC (rev 
33021)
@@ -1189,8 +1189,15 @@
     prev = q->prev;
     if (q->c == c)
     {
-      LOG (GNUNET_ERROR_TYPE_DEBUG, "GMP_cancel_queue %s\n", GM_m2s (q->type));
-      GMP_queue_destroy (q, GNUNET_YES, GNUNET_NO);
+      LOG (GNUNET_ERROR_TYPE_DEBUG, "GMP queue cancel %s\n", GM_m2s (q->type));
+      if (GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY != q->type)
+      {
+        q->c = NULL;
+      }
+      else
+      {
+        GMP_queue_destroy (q, GNUNET_YES, GNUNET_NO);
+      }
 
       /* Get next from prev, q->next might be already freed:
        * queue destroy -> callback -> GMC_destroy -> cancel_queues -> here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]