p->length = length;
p->peers = GNUNET_malloc (length * sizeof (GNUNET_PEER_Id));
}
- LOG (GNUNET_ERROR_TYPE_INFO, "New path %p (%u)\n", path, path->length);
+ LOG (GNUNET_ERROR_TYPE_INFO, "New path %p (%u)\n", p, p->length);
return p;
}
return GNUNET_OK;
}
endpoint = GCP_get_short (c->path->peers[c->path->length - 1]);
- path_invalidate (c->path);
+ if (2 < c->path->length)
+ path_invalidate (c->path);
GCP_notify_broken_link (endpoint, &msg->peer1, &msg->peer2);
c->state = CADET_CONNECTION_BROKEN;