diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-16 10:25:08 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-16 10:25:08 +0000 |
commit | f88bca9af603165f559f48a62878658dbd612bc0 (patch) | |
tree | c4c22342930cee9e435c371dd8f50213904c8d4c /src/mesh/gnunet-service-mesh_tunnel.c | |
parent | ac1b7bb981f8acd330e9e6d99596ba7aaf25471c (diff) | |
download | gnunet-f88bca9af603165f559f48a62878658dbd612bc0.tar.gz gnunet-f88bca9af603165f559f48a62878658dbd612bc0.zip |
- signal shutdown, don't create new connections, fix 3214
Diffstat (limited to 'src/mesh/gnunet-service-mesh_tunnel.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index f192bb05b..181395b09 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c | |||
@@ -222,6 +222,12 @@ extern struct GNUNET_PeerIdentity my_full_id; | |||
222 | 222 | ||
223 | 223 | ||
224 | /** | 224 | /** |
225 | * Don't try to recover tunnels if shutting down. | ||
226 | */ | ||
227 | extern int shutting_down; | ||
228 | |||
229 | |||
230 | /** | ||
225 | * Set of all tunnels, in order to trigger a new exchange on rekey. | 231 | * Set of all tunnels, in order to trigger a new exchange on rekey. |
226 | * Indexed by peer's ID. | 232 | * Indexed by peer's ID. |
227 | */ | 233 | */ |
@@ -1756,7 +1762,8 @@ GMT_add_connection (struct MeshTunnel3 *t, struct MeshConnection *c) | |||
1756 | * @param c Connection. | 1762 | * @param c Connection. |
1757 | */ | 1763 | */ |
1758 | void | 1764 | void |
1759 | GMT_remove_connection (struct MeshTunnel3 *t, struct MeshConnection *c) | 1765 | GMT_remove_connection (struct MeshTunnel3 *t, |
1766 | struct MeshConnection *c) | ||
1760 | { | 1767 | { |
1761 | struct MeshTConnection *aux; | 1768 | struct MeshTConnection *aux; |
1762 | struct MeshTConnection *next; | 1769 | struct MeshTConnection *next; |
@@ -1774,7 +1781,9 @@ GMT_remove_connection (struct MeshTunnel3 *t, struct MeshConnection *c) | |||
1774 | } | 1781 | } |
1775 | 1782 | ||
1776 | /* Start new connections if needed */ | 1783 | /* Start new connections if needed */ |
1777 | if (NULL == t->connection_head && GNUNET_NO == t->destroy) | 1784 | if (NULL == t->connection_head |
1785 | && GNUNET_NO == t->destroy | ||
1786 | && GNUNET_NO == shutting_down) | ||
1778 | { | 1787 | { |
1779 | LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections\n"); | 1788 | LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections\n"); |
1780 | GMP_connect (t->peer); | 1789 | GMP_connect (t->peer); |