summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-02-15 17:19:39 +0000
committerJulius Bünger <buenger@mytum.de>2015-02-15 17:19:39 +0000
commitb3d821fae66b2b020b4b89190559f54742d16317 (patch)
tree919145f01da1700a2fee350bd82772c84de64f24 /src
parent52f6eb0b44a0f6250024ae574fd74f22f7701846 (diff)
- restructured peer removal
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 325abb7a2..ce1b156b4 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1461,7 +1461,8 @@ removeCB (void *cls, struct RPS_Sampler *sampler,
s = RPS_sampler_count_id (sampler, id);
if ( 1 >= s )
{
- if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (peer_map, id))
+ if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (peer_map, id)
+ && 0 != GNUNET_CRYPTO_cmp_peer_identity (id, &own_identity))
{
ctx = GNUNET_CONTAINER_multipeermap_get (peer_map, id);
if (NULL != ctx->send_channel)
@@ -1469,12 +1470,15 @@ removeCB (void *cls, struct RPS_Sampler *sampler,
if (NULL != ctx->mq)
{
GNUNET_MQ_destroy (ctx->mq);
+ ctx->mq = NULL;
}
// may already be freed at shutdown of cadet
- //GNUNET_CADET_channel_destroy (ctx->send_channel);
+ // maybe this fails at our own channel
+ GNUNET_CADET_channel_destroy (ctx->send_channel);
+ ctx->send_channel = NULL;
}
// TODO cleanup peer
- (void) GNUNET_CONTAINER_multipeermap_remove_all (peer_map, id);
+ //(void) GNUNET_CONTAINER_multipeermap_remove_all (peer_map, id);
}
}
}