From 8fb72e64fd06c26ba31f296b882e07455e997625 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 17 Mar 2014 11:02:56 +0000 Subject: - set searching state before trying to reconnect, otherwise waiting is overwritten --- src/mesh/gnunet-service-mesh_tunnel.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/mesh/gnunet-service-mesh_tunnel.c') diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index f475e2d0c..23bbdd01a 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c @@ -1800,12 +1800,8 @@ GMT_change_cstate (struct MeshTunnel3* t, enum MeshTunnel3CState cstate) { 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 @@ GMT_change_cstate (struct MeshTunnel3* t, enum MeshTunnel3CState cstate) 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 @@ GMT_change_cstate (struct MeshTunnel3* t, enum MeshTunnel3CState cstate) 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 @@ GMT_remove_connection (struct MeshTunnel3 *t, && GNUNET_NO == shutting_down) { LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections, getting new ones\n"); - GMP_connect (t->peer); t->cstate = MESH_TUNNEL3_SEARCHING; + GMP_connect (t->peer); return; } -- cgit v1.2.3