gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r32677 - gnunet/src/mesh
Date: Mon, 17 Mar 2014 12:02:56 +0100

Author: bartpolot
Date: 2014-03-17 12:02:56 +0100 (Mon, 17 Mar 2014)
New Revision: 32677

Modified:
   gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
- set searching state before trying to reconnect, otherwise waiting is 
overwritten

Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c        2014-03-17 11:02:54 UTC 
(rev 32676)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c        2014-03-17 11:02:56 UTC 
(rev 32677)
@@ -1800,12 +1800,8 @@
 {
   if (NULL == t)
     return;
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-              "Tunnel %s cstate was %s\n",
-              GMP_2s (t->peer), cstate2s (t->cstate));
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-              "Tunnel %s cstate is now %s\n",
-              GMP_2s (t->peer), cstate2s (cstate));
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s cstate %s => %s\n",
+       GMP_2s (t->peer), cstate2s (t->cstate), cstate2s (cstate));
   if (myid != GMP_get_short_id (t->peer) &&
       MESH_TUNNEL3_READY != t->cstate &&
       MESH_TUNNEL3_READY == cstate)
@@ -1813,12 +1809,12 @@
     t->cstate = cstate;
     if (MESH_TUNNEL3_KEY_OK == t->estate)
     {
-      LOG (GNUNET_ERROR_TYPE_DEBUG, "  triggered send queued data\n");
+      LOG (GNUNET_ERROR_TYPE_DEBUG, "  cstate triggered send queued data\n");
       send_queued_data (t);
     }
     else if (MESH_TUNNEL3_KEY_UNINITIALIZED == t->estate)
     {
-      LOG (GNUNET_ERROR_TYPE_DEBUG, "  triggered rekey\n");
+      LOG (GNUNET_ERROR_TYPE_DEBUG, "  cstate triggered rekey\n");
       rekey_tunnel (t, NULL);
     }
   }
@@ -1826,6 +1822,7 @@
 
   if (MESH_TUNNEL3_READY == cstate && 3 <= GMT_count_connections (t))
   {
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "  cstate triggered stop dht\n");
     GMP_stop_search (t->peer);
   }
 }
@@ -1926,8 +1923,8 @@
       && GNUNET_NO == shutting_down)
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  no more connections, getting new ones\n");
+    t->cstate = MESH_TUNNEL3_SEARCHING;
     GMP_connect (t->peer);
-    t->cstate = MESH_TUNNEL3_SEARCHING;
     return;
   }
 




reply via email to

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