From e0648dd8e4f68e39e244c0e9f059d439da66f99a Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 21 Mar 2014 18:44:09 +0000 Subject: [PATCH] - establish connections on new paths --- src/mesh/gnunet-service-mesh_peer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index 28a53b088..e7697f0f5 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c @@ -1642,6 +1642,10 @@ GMP_add_path (struct MeshPeer *peer, struct MeshPeerPath *path, LOG (GNUNET_ERROR_TYPE_DEBUG, " added\n"); GNUNET_CONTAINER_DLL_insert_before (peer->path_head, peer->path_tail, aux, path); + if (NULL != peer->tunnel && 3 < GMT_count_connections (peer->tunnel)) + { + GMP_connect (peer); + } return path; } else @@ -1657,6 +1661,10 @@ GMP_add_path (struct MeshPeer *peer, struct MeshPeerPath *path, GNUNET_CONTAINER_DLL_insert_tail (peer->path_head, peer->path_tail, path); LOG (GNUNET_ERROR_TYPE_DEBUG, " added last\n"); + if (NULL != peer->tunnel && 3 < GMT_count_connections (peer->tunnel)) + { + GMP_connect (peer); + } return path; } -- 2.25.1