From: Christian Grothoff Date: Wed, 1 Feb 2017 20:07:52 +0000 (+0100) Subject: force attachment if connection is still there X-Git-Tag: taler-0.2.1~203 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=68ab49e28a51b4d877cbd37ad10868a482133c52;p=oweals%2Fgnunet.git force attachment if connection is still there --- diff --git a/src/cadet/gnunet-service-cadet-new_paths.c b/src/cadet/gnunet-service-cadet-new_paths.c index 14e7b75d5..7635dccf9 100644 --- a/src/cadet/gnunet-service-cadet-new_paths.c +++ b/src/cadet/gnunet-service-cadet-new_paths.c @@ -227,6 +227,7 @@ void GCPP_release (struct CadetPeerPath *path) { struct CadetPeerPathEntry *entry; + int force; LOG (GNUNET_ERROR_TYPE_DEBUG, "Owner releases path %s\n", @@ -249,12 +250,14 @@ GCPP_release (struct CadetPeerPath *path) /* see if new peer at the end likes this path any better */ entry = path->entries[path->entries_length - 1]; GNUNET_assert (path == entry->path); + force = (NULL == entry->cc) ? GNUNET_NO : GNUNET_YES; path->hn = GCP_attach_path (entry->peer, path, path->entries_length - 1, - GNUNET_NO); + force); if (NULL != path->hn) return; /* yep, got attached, we are done. */ + GNUNET_assert (GNUNET_NO == force); } /* nobody wants us, discard the path */