diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-10-10 12:39:45 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-10-10 12:39:45 +0000 |
commit | 28d38d5c3a001d874c872bbde8b3d01f2df6c6d6 (patch) | |
tree | 29e96290f51bb5aeb270479ee800f8ee2f6e236b /src/mesh/gnunet-service-mesh_tunnel.c | |
parent | 8570ed1dc10a812aa7b5b3a3b71f2e988eb5d3c6 (diff) | |
download | gnunet-28d38d5c3a001d874c872bbde8b3d01f2df6c6d6.tar.gz gnunet-28d38d5c3a001d874c872bbde8b3d01f2df6c6d6.zip |
- connection fixing
Diffstat (limited to 'src/mesh/gnunet-service-mesh_tunnel.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index 1ceb500ba..f20492c2c 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c | |||
@@ -65,7 +65,7 @@ struct MeshTunnel3 | |||
65 | /** | 65 | /** |
66 | * State of the tunnel. | 66 | * State of the tunnel. |
67 | */ | 67 | */ |
68 | enum MeshTunnelState state; | 68 | enum MeshTunnel3State state; |
69 | 69 | ||
70 | /** | 70 | /** |
71 | * Local peer ephemeral private key | 71 | * Local peer ephemeral private key |
@@ -196,7 +196,7 @@ const static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key; | |||
196 | * @return String representation. | 196 | * @return String representation. |
197 | */ | 197 | */ |
198 | static const char * | 198 | static const char * |
199 | GMT_state2s (enum MeshTunnelState s) | 199 | GMT_state2s (enum MeshTunnel3State s) |
200 | { | 200 | { |
201 | static char buf[128]; | 201 | static char buf[128]; |
202 | 202 | ||
@@ -619,7 +619,7 @@ GMT_new (void) | |||
619 | * @param state New state. | 619 | * @param state New state. |
620 | */ | 620 | */ |
621 | void | 621 | void |
622 | GMT_change_state (struct MeshTunnel3* t, enum MeshTunnelState state) | 622 | GMT_change_state (struct MeshTunnel3* t, enum MeshTunnel3State state) |
623 | { | 623 | { |
624 | if (NULL == t) | 624 | if (NULL == t) |
625 | return; | 625 | return; |
@@ -632,6 +632,10 @@ GMT_change_state (struct MeshTunnel3* t, enum MeshTunnelState state) | |||
632 | GMP_2s (t->peer), | 632 | GMP_2s (t->peer), |
633 | GMT_state2s (state)); | 633 | GMT_state2s (state)); |
634 | t->state = state; | 634 | t->state = state; |
635 | if (MESH_TUNNEL_READY == state && 3 <= GMT_count_connections (t)) | ||
636 | { | ||
637 | GMP_stop_search (t->peer); | ||
638 | } | ||
635 | } | 639 | } |
636 | 640 | ||
637 | 641 | ||
@@ -996,7 +1000,7 @@ GMT_count_channels (struct MeshTunnel3 *t) | |||
996 | * | 1000 | * |
997 | * @return Tunnel's state. | 1001 | * @return Tunnel's state. |
998 | */ | 1002 | */ |
999 | enum MeshTunnelState | 1003 | enum MeshTunnel3State |
1000 | GMT_get_state (struct MeshTunnel3 *t) | 1004 | GMT_get_state (struct MeshTunnel3 *t) |
1001 | { | 1005 | { |
1002 | return t->state; | 1006 | return t->state; |