From 93ee5f80204b1df7e495fc95bbc2270c11da9b6d Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Sat, 13 Jan 2018 13:35:15 -0600 Subject: [PATCH] Fix force extend_path --- src/cadet/gnunet-service-cadet_paths.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/cadet/gnunet-service-cadet_paths.c b/src/cadet/gnunet-service-cadet_paths.c index 9dd6f1ddd..b443cf9e8 100644 --- a/src/cadet/gnunet-service-cadet_paths.c +++ b/src/cadet/gnunet-service-cadet_paths.c @@ -429,7 +429,17 @@ extend_path (struct CadetPeerPath *path, path->hn); path->hn = NULL; path->entries_length = old_len + num_peers; - attach_path (path, old_len); + if (GNUNET_YES == force) + { + int end = path->entries_length - 1; + + path->hn = GCP_attach_path (path->entries[end]->peer, + path, + end, + GNUNET_YES); + } else { + attach_path (path, old_len); + } if (NULL == path->hn) { /* none of the peers is interested in this path; -- 2.25.1