diff options
Diffstat (limited to 'src')
-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 | } |