[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27601 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27601 - gnunet/src/mesh |
Date: |
Wed, 26 Jun 2013 02:10:07 +0200 |
Author: bartpolot
Date: 2013-06-26 02:10:07 +0200 (Wed, 26 Jun 2013)
New Revision: 27601
Modified:
gnunet/src/mesh/gnunet-service-mesh-new.c
Log:
- add paths to self from core, no need for dht lookup
Modified: gnunet/src/mesh/gnunet-service-mesh-new.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh-new.c 2013-06-25 23:52:13 UTC (rev
27600)
+++ gnunet/src/mesh/gnunet-service-mesh-new.c 2013-06-26 00:10:07 UTC (rev
27601)
@@ -1212,6 +1212,7 @@
{
struct MeshPeerInfo *neighbor;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Send create path\n");
neighbor = peer_get_short (t->next_hop);
queue_add (t,
GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE,
@@ -1280,7 +1281,11 @@
&dht_get_id_handler, peer);
t->state = MESH_TUNNEL_SEARCHING;
}
- /* Otherwise, there is no path but the DHT get is already started. */
+ else
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "There is no path but the DHT GET is already started.\n");
+ }
}
@@ -1446,7 +1451,7 @@
}
#endif
l = path_get_length (path);
- if (2 >= l)
+ if (0 == l)
{
path_destroy (path);
return;
@@ -3937,8 +3942,18 @@
path_destroy (p);
for (i = 0; i < peer->ntunnels; i++)
{
+ struct GNUNET_PeerIdentity id;
+
+ GNUNET_PEER_resolve (peer->tunnels[i]->id.oid, &id);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ... tunnel %s:%X (%X / %X)\n",
+ GNUNET_i2s (&id), peer->tunnels[i]->id.tid,
+ peer->tunnels[i]->local_tid,
+ peer->tunnels[i]->local_tid_dest);
if (peer->tunnels[i]->state == MESH_TUNNEL_SEARCHING)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ... connect!\n");
peer_connect (peer, peer->tunnels[i]);
+ }
}
return;
@@ -4728,19 +4743,19 @@
if (myid == peer_info->id)
{
DEBUG_CONN (" (self)\n");
- return;
+ path = path_new (1);
}
else
{
DEBUG_CONN (" %s\n", GNUNET_i2s (peer));
+ path = path_new (2);
+ path->peers[1] = peer_info->id;
+ GNUNET_PEER_change_rc (peer_info->id, 1);
+ GNUNET_STATISTICS_update (stats, "# peers", 1, GNUNET_NO);
}
- path = path_new (2);
path->peers[0] = myid;
- path->peers[1] = peer_info->id;
GNUNET_PEER_change_rc (myid, 1);
- GNUNET_PEER_change_rc (peer_info->id, 1);
peer_info_add_path (peer_info, path, GNUNET_YES);
- GNUNET_STATISTICS_update (stats, "# peers", 1, GNUNET_NO);
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27601 - gnunet/src/mesh,
gnunet <=