diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-03-17 11:02:56 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-03-17 11:02:56 +0000 |
commit | 8fb72e64fd06c26ba31f296b882e07455e997625 (patch) | |
tree | 5bafd4b6801e2298c27a037bdb0d813b75047a79 /src/mesh/gnunet-service-mesh_tunnel.c | |
parent | 6e1fa63832742e5b1a5480f97f4ebf3654996b9a (diff) | |
download | gnunet-8fb72e64fd06c26ba31f296b882e07455e997625.tar.gz gnunet-8fb72e64fd06c26ba31f296b882e07455e997625.zip |
- set searching state before trying to reconnect, otherwise waiting is overwritten
Diffstat (limited to 'src/mesh/gnunet-service-mesh_tunnel.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.c | 15 |
1 files changed, 6 insertions, 9 deletions
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) | |||
1800 | { | 1800 | { |
1801 | if (NULL == t) | 1801 | if (NULL == t) |
1802 | return; | 1802 | return; |
1803 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1803 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s cstate %s => %s\n", |
1804 | "Tunnel %s cstate was %s\n", | 1804 | GMP_2s (t->peer), cstate2s (t->cstate), cstate2s (cstate)); |
1805 | GMP_2s (t->peer), cstate2s (t->cstate)); | ||
1806 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
1807 | "Tunnel %s cstate is now %s\n", | ||
1808 | GMP_2s (t->peer), cstate2s (cstate)); | ||
1809 | if (myid != GMP_get_short_id (t->peer) && | 1805 | if (myid != GMP_get_short_id (t->peer) && |
1810 | MESH_TUNNEL3_READY != t->cstate && | 1806 | MESH_TUNNEL3_READY != t->cstate && |
1811 | MESH_TUNNEL3_READY == cstate) | 1807 | MESH_TUNNEL3_READY == cstate) |
@@ -1813,12 +1809,12 @@ GMT_change_cstate (struct MeshTunnel3* t, enum MeshTunnel3CState cstate) | |||
1813 | t->cstate = cstate; | 1809 | t->cstate = cstate; |
1814 | if (MESH_TUNNEL3_KEY_OK == t->estate) | 1810 | if (MESH_TUNNEL3_KEY_OK == t->estate) |
1815 | { | 1811 | { |
1816 | LOG (GNUNET_ERROR_TYPE_DEBUG, " triggered send queued data\n"); | 1812 | LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate triggered send queued data\n"); |
1817 | send_queued_data (t); | 1813 | send_queued_data (t); |
1818 | } | 1814 | } |
1819 | else if (MESH_TUNNEL3_KEY_UNINITIALIZED == t->estate) | 1815 | else if (MESH_TUNNEL3_KEY_UNINITIALIZED == t->estate) |
1820 | { | 1816 | { |
1821 | LOG (GNUNET_ERROR_TYPE_DEBUG, " triggered rekey\n"); | 1817 | LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate triggered rekey\n"); |
1822 | rekey_tunnel (t, NULL); | 1818 | rekey_tunnel (t, NULL); |
1823 | } | 1819 | } |
1824 | } | 1820 | } |
@@ -1826,6 +1822,7 @@ GMT_change_cstate (struct MeshTunnel3* t, enum MeshTunnel3CState cstate) | |||
1826 | 1822 | ||
1827 | if (MESH_TUNNEL3_READY == cstate && 3 <= GMT_count_connections (t)) | 1823 | if (MESH_TUNNEL3_READY == cstate && 3 <= GMT_count_connections (t)) |
1828 | { | 1824 | { |
1825 | LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate triggered stop dht\n"); | ||
1829 | GMP_stop_search (t->peer); | 1826 | GMP_stop_search (t->peer); |
1830 | } | 1827 | } |
1831 | } | 1828 | } |
@@ -1926,8 +1923,8 @@ GMT_remove_connection (struct MeshTunnel3 *t, | |||
1926 | && GNUNET_NO == shutting_down) | 1923 | && GNUNET_NO == shutting_down) |
1927 | { | 1924 | { |
1928 | LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections, getting new ones\n"); | 1925 | LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections, getting new ones\n"); |
1929 | GMP_connect (t->peer); | ||
1930 | t->cstate = MESH_TUNNEL3_SEARCHING; | 1926 | t->cstate = MESH_TUNNEL3_SEARCHING; |
1927 | GMP_connect (t->peer); | ||
1931 | return; | 1928 | return; |
1932 | } | 1929 | } |
1933 | 1930 | ||