force attachment if connection is still there
authorChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2017 20:07:52 +0000 (21:07 +0100)
committerChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2017 20:07:52 +0000 (21:07 +0100)
src/cadet/gnunet-service-cadet-new_paths.c

index 14e7b75d56ed2f75d8b53a9a4a314408076f805b..7635dccf9cb94b366ec23c41a060943d45d7db79 100644 (file)
@@ -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 */