diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-06-26 02:03:22 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-06-26 02:03:22 +0000 |
commit | 8f4a59e82b63d229199b43e0d31fd7b7dfd9779f (patch) | |
tree | 0f3eb2a21bb868c38bc5382e2900d12983d837c6 | |
parent | b1badb7a42a9fffd291454e7ae114d0a21ff152e (diff) | |
download | gnunet-8f4a59e82b63d229199b43e0d31fd7b7dfd9779f.tar.gz gnunet-8f4a59e82b63d229199b43e0d31fd7b7dfd9779f.zip |
- Fix #3846. When receiving a create request for an invalid path singal that register failed to avoid trying to unregister the connection on destroy.
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 10 |
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) | |||
1577 | { | 1577 | { |
1578 | struct CadetPeer *peer; | 1578 | struct CadetPeer *peer; |
1579 | 1579 | ||
1580 | /* Either already unregistered or never got registered, it's ok either way. */ | ||
1580 | if (NULL == c->path) | 1581 | if (NULL == c->path) |
1581 | return; | 1582 | return; |
1582 | 1583 | ||
@@ -2772,10 +2773,15 @@ GCC_new (const struct GNUNET_CADET_Hash *cid, | |||
2772 | { | 2773 | { |
2773 | if (0 == own_pos) | 2774 | if (0 == own_pos) |
2774 | { | 2775 | { |
2775 | path_invalidate (c->path); | 2776 | /* We were the origin of this request, this means we have invalid |
2777 | * info about the paths to reach the destination. We must invalidate | ||
2778 | * the *original* path to avoid trying it again in the next minute. | ||
2779 | */ | ||
2780 | path_invalidate (path); | ||
2776 | c->t = NULL; | 2781 | c->t = NULL; |
2777 | c->path = NULL; | ||
2778 | } | 2782 | } |
2783 | path_destroy (c->path); | ||
2784 | c->path = NULL; | ||
2779 | GCC_destroy (c); | 2785 | GCC_destroy (c); |
2780 | return NULL; | 2786 | return NULL; |
2781 | } | 2787 | } |