From: Christian Grothoff Date: Sun, 22 Jan 2017 19:21:35 +0000 (+0100) Subject: really fully create path objects before calling even GCP_path_entry_add() X-Git-Tag: taler-0.2.1~358 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=03e7e0a5cd715d5ef4647ee8a40b10dead7c883f;p=oweals%2Fgnunet.git really fully create path objects before calling even GCP_path_entry_add() --- diff --git a/src/cadet/gnunet-service-cadet-new_paths.c b/src/cadet/gnunet-service-cadet-new_paths.c index 86424968c..0fb558d81 100644 --- a/src/cadet/gnunet-service-cadet-new_paths.c +++ b/src/cadet/gnunet-service-cadet-new_paths.c @@ -369,6 +369,11 @@ extend_path (struct CadetPeerPath *path, path->entries[old_len + i] = entry; entry->peer = peers[i]; entry->path = path; + } + for (i=num_peers-1;i >= 0;i--) + { + struct CadetPeerPathEntry *entry = path->entries[old_len + i]; + GCP_path_entry_add (entry->peer, entry, old_len + i); @@ -497,6 +502,11 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, path->entries[i] = entry; entry->peer = cpath[i]; entry->path = path; + } + for (i=path->entries_length-1;i>=0;i--) + { + struct CadetPeerPathEntry *entry = path->entries[i]; + GCP_path_entry_add (entry->peer, entry, i); @@ -615,6 +625,11 @@ GCPP_get_path_from_route (unsigned int path_length, path->entries[i] = entry; entry->peer = cpath[i]; entry->path = path; + } + for (int i=path_length-1;i>=0;i--) + { + struct CadetPeerPathEntry *entry = path->entries[i]; + GCP_path_entry_add (entry->peer, entry, i);