diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-10-26 10:05:09 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-10-26 10:05:09 +0000 |
commit | 1505339f12dd56f7cdcc3237cd88869b0b8c7ed3 (patch) | |
tree | 793f78c50c697851a0cc5982f497c7da5606f56e /src | |
parent | f8148eb4ca75dd9b72f11b8b42b157c9534bc9ad (diff) | |
download | gnunet-1505339f12dd56f7cdcc3237cd88869b0b8c7ed3.tar.gz gnunet-1505339f12dd56f7cdcc3237cd88869b0b8c7ed3.zip |
Fixed #1853
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 08a69b151..c7cc171d4 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -1292,16 +1292,14 @@ static int | |||
1292 | peer_info_destroy (struct MeshPeerInfo *pi) | 1292 | peer_info_destroy (struct MeshPeerInfo *pi) |
1293 | { | 1293 | { |
1294 | struct GNUNET_PeerIdentity id; | 1294 | struct GNUNET_PeerIdentity id; |
1295 | GNUNET_HashCode hash; | ||
1296 | struct MeshPeerPath *p; | 1295 | struct MeshPeerPath *p; |
1297 | struct MeshPeerPath *nextp; | 1296 | struct MeshPeerPath *nextp; |
1298 | unsigned int i; | 1297 | unsigned int i; |
1299 | 1298 | ||
1300 | GNUNET_PEER_resolve (pi->id, &id); | 1299 | GNUNET_PEER_resolve (pi->id, &id); |
1301 | GNUNET_PEER_change_rc (pi->id, -1); | 1300 | GNUNET_PEER_change_rc (pi->id, -1); |
1302 | GNUNET_CRYPTO_hash (&id, sizeof (struct GNUNET_PeerIdentity), &hash); | ||
1303 | 1301 | ||
1304 | if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_remove (peers, &hash, pi)) | 1302 | if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_remove (peers, &id.hashPubKey, pi)) |
1305 | { | 1303 | { |
1306 | GNUNET_break (0); | 1304 | GNUNET_break (0); |
1307 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1305 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -4119,7 +4117,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
4119 | * @return GNUNET_YES if we should continue to iterate, | 4117 | * @return GNUNET_YES if we should continue to iterate, |
4120 | * GNUNET_NO if not. | 4118 | * GNUNET_NO if not. |
4121 | */ | 4119 | */ |
4122 | int | 4120 | static int |
4123 | shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value) | 4121 | shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value) |
4124 | { | 4122 | { |
4125 | struct MeshTunnel *t = value; | 4123 | struct MeshTunnel *t = value; |
@@ -4136,11 +4134,11 @@ shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value) | |||
4136 | * @return GNUNET_YES if we should continue to iterate, | 4134 | * @return GNUNET_YES if we should continue to iterate, |
4137 | * GNUNET_NO if not. | 4135 | * GNUNET_NO if not. |
4138 | */ | 4136 | */ |
4139 | int | 4137 | static int |
4140 | shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value) | 4138 | shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value) |
4141 | { | 4139 | { |
4142 | struct MeshPeerInfo *p = value; | 4140 | struct MeshPeerInfo *p = value; |
4143 | peer_info_destroy(p); | 4141 | peer_info_destroy (p); |
4144 | return GNUNET_YES; | 4142 | return GNUNET_YES; |
4145 | } | 4143 | } |
4146 | 4144 | ||