summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-06-26 02:03:22 +0000
committerBart Polot <bart@net.in.tum.de>2015-06-26 02:03:22 +0000
commit8f4a59e82b63d229199b43e0d31fd7b7dfd9779f (patch)
tree0f3eb2a21bb868c38bc5382e2900d12983d837c6 /src
parentb1badb7a42a9fffd291454e7ae114d0a21ff152e (diff)
- Fix #3846. When receiving a create request for an invalid path singal that register failed to avoid trying to unregister the connection on destroy.
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index d4058db5b..5ce3f775d 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -1577,6 +1577,7 @@ unregister_neighbors (struct CadetConnection *c)
{
struct CadetPeer *peer;
+ /* Either already unregistered or never got registered, it's ok either way. */
if (NULL == c->path)
return;
@@ -2772,10 +2773,15 @@ GCC_new (const struct GNUNET_CADET_Hash *cid,
{
if (0 == own_pos)
{
- path_invalidate (c->path);
+ /* We were the origin of this request, this means we have invalid
+ * info about the paths to reach the destination. We must invalidate
+ * the *original* path to avoid trying it again in the next minute.
+ */
+ path_invalidate (path);
c->t = NULL;
- c->path = NULL;
}
+ path_destroy (c->path);
+ c->path = NULL;
GCC_destroy (c);
return NULL;
}