aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-10-26 10:05:09 +0000
committerBart Polot <bart@net.in.tum.de>2011-10-26 10:05:09 +0000
commit1505339f12dd56f7cdcc3237cd88869b0b8c7ed3 (patch)
tree793f78c50c697851a0cc5982f497c7da5606f56e
parentf8148eb4ca75dd9b72f11b8b42b157c9534bc9ad (diff)
downloadgnunet-1505339f12dd56f7cdcc3237cd88869b0b8c7ed3.tar.gz
gnunet-1505339f12dd56f7cdcc3237cd88869b0b8c7ed3.zip
Fixed #1853
-rw-r--r--src/mesh/gnunet-service-mesh.c10
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
1292peer_info_destroy (struct MeshPeerInfo *pi) 1292peer_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 */
4122int 4120static int
4123shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value) 4121shutdown_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 */
4139int 4137static int
4140shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value) 4138shutdown_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