From: Bart Polot Date: Wed, 17 Jun 2015 09:29:07 +0000 (+0000) Subject: - don't invalidate direct connections unless peer disconnects on core level X-Git-Tag: initial-import-from-subversion-38251~1734 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fd057b7cf6c72ce512dab9d6f3d47f052053df83;p=oweals%2Fgnunet.git - don't invalidate direct connections unless peer disconnects on core level --- diff --git a/src/cadet/cadet_path.c b/src/cadet/cadet_path.c index 16e55aa0f..1118f0e22 100644 --- a/src/cadet/cadet_path.c +++ b/src/cadet/cadet_path.c @@ -77,7 +77,7 @@ path_new (unsigned int length) 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; } diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 4791e6d03..c5ef4c732 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c @@ -2061,7 +2061,8 @@ GCC_handle_broken (void* cls, 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;