gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r31409 - gnunet/src/mesh
Date: Mon, 16 Dec 2013 14:33:12 +0100

Author: bartpolot
Date: 2013-12-16 14:33:12 +0100 (Mon, 16 Dec 2013)
New Revision: 31409

Modified:
   gnunet/src/mesh/gnunet-service-mesh_connection.c
Log:
- simplify error handling


Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c    2013-12-16 12:37:49 UTC 
(rev 31408)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c    2013-12-16 13:33:12 UTC 
(rev 31409)
@@ -2224,6 +2224,7 @@
     if (0 == own_pos)
     {
       GMT_remove_path (c->t, p);
+      c->t = NULL;
       c->path = NULL;
     }
     GMC_destroy (c);
@@ -2265,6 +2266,7 @@
   {
     connection_cancel_queues (c, GNUNET_YES);
     connection_cancel_queues (c, GNUNET_NO);
+    unregister_neighbors (c);
   }
 
   LOG (GNUNET_ERROR_TYPE_DEBUG, " fc tasks f: %u, b: %u\n",
@@ -2282,11 +2284,7 @@
     LOG (GNUNET_ERROR_TYPE_DEBUG, " *** POLL msg BCK canceled\n");
   }
 
-  /* Unregister from neighbors */
-  unregister_neighbors (c);
-
-  /* Delete */
-  GNUNET_STATISTICS_update (stats, "# connections", -1, GNUNET_NO);
+  /* Delete from tunnel */
   if (NULL != c->t)
     GMT_remove_connection (c->t, c);
 
@@ -2310,6 +2308,7 @@
   GNUNET_break (GNUNET_YES ==
                 GNUNET_CONTAINER_multihashmap_remove (connections, &c->id, c));
 
+  GNUNET_STATISTICS_update (stats, "# connections", -1, GNUNET_NO);
   GNUNET_free (c);
 }
 




reply via email to

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