if (NULL == p)
{
GNUNET_break (0);
+ GNUNET_free (info);
return;
}
i = peer_info_transmit_slot (neighbor);
for (i = 0; i < peer->ntunnels; i++)
{
d = tunnel_notify_connection_broken (peer->tunnels[i], p1, p2);
+ if (0 == d) continue;
/* TODO
* Problem: one or more peers have been deleted from the tunnel tree.
* We don't know who they are to try to add them again.
}
if (NULL != aux)
{
- /* No callback, as peer will be already disconnected */
+ /* No callback, as peer will be already disconnected and a connection
+ * scheduled by tunnel_notify_connection_broken.
+ */
tree_add_path (peer->tunnels[i]->tree, aux, NULL, NULL);
}
else
if (path->peers[l] == myid)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: shortening path by %u\n", l);
- for (l2 = 0; l2 < path->length - l - 1; l2++)
+ for (l2 = 0; l2 < path->length - l; l2++)
{
path->peers[l2] = path->peers[l + l2];
}