From 68ab49e28a51b4d877cbd37ad10868a482133c52 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 1 Feb 2017 21:07:52 +0100 Subject: [PATCH] force attachment if connection is still there --- src/cadet/gnunet-service-cadet-new_paths.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 */ -- 2.25.1