diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-06-17 09:29:07 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-06-17 09:29:07 +0000 |
commit | fd057b7cf6c72ce512dab9d6f3d47f052053df83 (patch) | |
tree | 199259669ffe9c56a3244b470761cd332ee52c95 /src | |
parent | 5e30cb01927f7f325f01dcafeccb3af043b270a1 (diff) | |
download | gnunet-fd057b7cf6c72ce512dab9d6f3d47f052053df83.tar.gz gnunet-fd057b7cf6c72ce512dab9d6f3d47f052053df83.zip |
- don't invalidate direct connections unless peer disconnects on core level
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/cadet_path.c | 2 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cadet/cadet_path.c b/src/cadet/cadet_path.c index 16e55aa0f..1118f0e22 100644 --- a/src/cadet/cadet_path.c +++ b/src/cadet/cadet_path.c | |||
@@ -77,7 +77,7 @@ path_new (unsigned int length) | |||
77 | p->length = length; | 77 | p->length = length; |
78 | p->peers = GNUNET_malloc (length * sizeof (GNUNET_PEER_Id)); | 78 | p->peers = GNUNET_malloc (length * sizeof (GNUNET_PEER_Id)); |
79 | } | 79 | } |
80 | LOG (GNUNET_ERROR_TYPE_INFO, "New path %p (%u)\n", path, path->length); | 80 | LOG (GNUNET_ERROR_TYPE_INFO, "New path %p (%u)\n", p, p->length); |
81 | return p; | 81 | return p; |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 4791e6d03..c5ef4c732 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -2061,7 +2061,8 @@ GCC_handle_broken (void* cls, | |||
2061 | return GNUNET_OK; | 2061 | return GNUNET_OK; |
2062 | } | 2062 | } |
2063 | endpoint = GCP_get_short (c->path->peers[c->path->length - 1]); | 2063 | endpoint = GCP_get_short (c->path->peers[c->path->length - 1]); |
2064 | path_invalidate (c->path); | 2064 | if (2 < c->path->length) |
2065 | path_invalidate (c->path); | ||
2065 | GCP_notify_broken_link (endpoint, &msg->peer1, &msg->peer2); | 2066 | GCP_notify_broken_link (endpoint, &msg->peer1, &msg->peer2); |
2066 | 2067 | ||
2067 | c->state = CADET_CONNECTION_BROKEN; | 2068 | c->state = CADET_CONNECTION_BROKEN; |