commit e0648dd8e4f68e39e244c0e9f059d439da66f99a
parent aa8f65899624056357b9f21e270ee7056b33fa27
Author: Bart Polot <bart@net.in.tum.de>
Date: Fri, 21 Mar 2014 18:44:09 +0000
- establish connections on new paths
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git 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;
}