mesh_tunnel_tree.c | mesh_tunnel_tree.c | |||
---|---|---|---|---|
skipping to change at line 812 | skipping to change at line 812 | |||
/* Add the rest of the path as a branch from parent. */ | /* Add the rest of the path as a branch from parent. */ | |||
while (i < p->length) | while (i < p->length) | |||
{ | { | |||
#if MESH_TREE_DEBUG | #if MESH_TREE_DEBUG | |||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Adding peer %u to %u.\n", | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Adding peer %u to %u.\n", | |||
p->peers[i], parent->peer); | p->peers[i], parent->peer); | |||
GNUNET_PEER_resolve (p->peers[i], &id); | GNUNET_PEER_resolve (p->peers[i], &id); | |||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Adding peer %s.\n", | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Adding peer %s.\n", | |||
GNUNET_i2s (&id)); | GNUNET_i2s (&id)); | |||
GNUNET_PEER_resolve (parent->peer, &id); | GNUNET_PEER_resolve (parent->peer, &id); | |||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: to %s.\n", | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: to %s.\n", | |||
GNUNET_i2s (&id)); | GNUNET_i2s (&id)); | |||
#endif | #endif | |||
if (i == p->length - 1 && NULL != oldnode) | if (i == p->length - 1 && NULL != oldnode) | |||
{ | { | |||
#if MESH_TREE_DEBUG | #if MESH_TREE_DEBUG | |||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | |||
"tree: Putting old node into place.\n"); | "tree: Putting old node into place.\n"); | |||
#endif | #endif | |||
oldnode->parent = parent; | oldnode->parent = parent; | |||
skipping to change at line 835 | skipping to change at line 835 | |||
tree_node_update_first_hops (t, oldnode, NULL); | tree_node_update_first_hops (t, oldnode, NULL); | |||
n = oldnode; | n = oldnode; | |||
} | } | |||
else | else | |||
{ | { | |||
#if MESH_TREE_DEBUG | #if MESH_TREE_DEBUG | |||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Creating new node.\n"); | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Creating new node.\n"); | |||
#endif | #endif | |||
n = tree_node_new (parent, p->peers[i]); | n = tree_node_new (parent, p->peers[i]); | |||
n->status = MESH_PEER_RELAY; | n->status = MESH_PEER_RELAY; | |||
if (n->peer == 1) | } | |||
{ | if (n->peer == 1) | |||
t->me = n; | { | |||
me = i; | t->me = n; | |||
} | me = i; | |||
} | } | |||
i++; | i++; | |||
parent = n; | parent = n; | |||
} | } | |||
n->status = MESH_PEER_SEARCHING; | n->status = MESH_PEER_SEARCHING; | |||
GNUNET_break (-1 != me); | GNUNET_break (-1 != me); | |||
/* Add info about first hop into hashmap. */ | /* Add info about first hop into hashmap. */ | |||
if (-1 != me && me < p->length - 1) | if (-1 != me && me < p->length - 1) | |||
End of changes. 2 change blocks. | ||||
6 lines changed or deleted | 6 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |