- establish connections on new paths
authorBart Polot <bart@net.in.tum.de>
Fri, 21 Mar 2014 18:44:09 +0000 (18:44 +0000)
committerBart Polot <bart@net.in.tum.de>
Fri, 21 Mar 2014 18:44:09 +0000 (18:44 +0000)
src/mesh/gnunet-service-mesh_peer.c

index 28a53b088689c9db1af16b81c83f75f2699a263d..e7697f0f50a269d575b334ef928e743c7f416b8b 100644 (file)
@@ -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;
 }