diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-03-22 02:58:34 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-03-22 02:58:34 +0000 |
commit | 74ac142982b8257fa02a2d99d8a5eed8263d2cf2 (patch) | |
tree | d1892965363dc6f3d622192a03a1d81647e90f32 /src/mesh | |
parent | adfba42af703753208d1fe48ae861f11f705a8be (diff) | |
download | gnunet-74ac142982b8257fa02a2d99d8a5eed8263d2cf2.tar.gz gnunet-74ac142982b8257fa02a2d99d8a5eed8263d2cf2.zip |
- invalidate instead of destroying, to avoid reusing right away (from stale DHT info, for instance)
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh_peer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index 2884b1a53..eaa066b5c 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c | |||
@@ -1807,9 +1807,7 @@ GMP_remove_path (struct MeshPeer *peer, struct MeshPeerPath *path) | |||
1807 | if (0 == memcmp (path->peers, iter->peers, | 1807 | if (0 == memcmp (path->peers, iter->peers, |
1808 | sizeof (GNUNET_PEER_Id) * path->length)) | 1808 | sizeof (GNUNET_PEER_Id) * path->length)) |
1809 | { | 1809 | { |
1810 | GNUNET_CONTAINER_DLL_remove (peer->path_head, peer->path_tail, iter); | 1810 | path_invalidate (iter); |
1811 | if (path != iter) | ||
1812 | path_destroy (iter); | ||
1813 | } | 1811 | } |
1814 | } | 1812 | } |
1815 | path_destroy (path); | 1813 | path_destroy (path); |
@@ -2067,11 +2065,10 @@ GMP_notify_broken_link (struct MeshPeer *peer, | |||
2067 | char *s; | 2065 | char *s; |
2068 | 2066 | ||
2069 | s = path_2s (iter); | 2067 | s = path_2s (iter); |
2070 | LOG (GNUNET_ERROR_TYPE_DEBUG, " - destroying %s\n", s); | 2068 | LOG (GNUNET_ERROR_TYPE_DEBUG, " - invalidating %s\n", s); |
2071 | GNUNET_free (s); | 2069 | GNUNET_free (s); |
2072 | 2070 | ||
2073 | GNUNET_CONTAINER_DLL_remove (peer->path_head, peer->path_tail, iter); | 2071 | path_invalidate (iter); |
2074 | path_destroy (iter); | ||
2075 | } | 2072 | } |
2076 | } | 2073 | } |
2077 | } | 2074 | } |