diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh_tunnel.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index 7b51106af..110c6d07e 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c | |||
@@ -1872,6 +1872,7 @@ GMT_remove_connection (struct MeshTunnel3 *t, | |||
1872 | /* Start new connections if needed */ | 1872 | /* Start new connections if needed */ |
1873 | if (NULL == t->connection_head | 1873 | if (NULL == t->connection_head |
1874 | && GNUNET_SCHEDULER_NO_TASK == t->destroy_task | 1874 | && GNUNET_SCHEDULER_NO_TASK == t->destroy_task |
1875 | && MESH_TUNNEL3_SHUTDOWN != t->cstate | ||
1875 | && GNUNET_NO == shutting_down) | 1876 | && GNUNET_NO == shutting_down) |
1876 | { | 1877 | { |
1877 | LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections, getting new ones\n"); | 1878 | LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections, getting new ones\n"); |
@@ -1996,6 +1997,7 @@ delayed_destroy (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1996 | struct MeshTunnel3 *t = cls; | 1997 | struct MeshTunnel3 *t = cls; |
1997 | 1998 | ||
1998 | t->destroy_task = GNUNET_SCHEDULER_NO_TASK; | 1999 | t->destroy_task = GNUNET_SCHEDULER_NO_TASK; |
2000 | t->cstate = MESH_TUNNEL3_SHUTDOWN; | ||
1999 | GMT_destroy (t); | 2001 | GMT_destroy (t); |
2000 | } | 2002 | } |
2001 | 2003 | ||
@@ -2127,6 +2129,12 @@ GMT_use_path (struct MeshTunnel3 *t, struct MeshPeerPath *p) | |||
2127 | return NULL; | 2129 | return NULL; |
2128 | } | 2130 | } |
2129 | 2131 | ||
2132 | if (MESH_TUNNEL3_SHUTDOWN == t->cstate) | ||
2133 | { | ||
2134 | GNUNET_break (0); | ||
2135 | return NULL; | ||
2136 | } | ||
2137 | |||
2130 | for (own_pos = 0; own_pos < p->length; own_pos++) | 2138 | for (own_pos = 0; own_pos < p->length; own_pos++) |
2131 | { | 2139 | { |
2132 | if (p->peers[own_pos] == myid) | 2140 | if (p->peers[own_pos] == myid) |