From 51ceab571cf7c3810c5c75c03c815d44f9e78f02 Mon Sep 17 00:00:00 2001 From: Julius Bünger Date: Wed, 28 Jan 2015 13:39:47 +0000 Subject: fixed wrong cancellation --- src/rps/gnunet-service-rps.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 4020118c9..f8b2e6f22 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c @@ -509,6 +509,8 @@ peer_is_live (void *cls, size_t size, void *buf) struct GNUNET_PeerIdentity *peer; struct PeerContext *peer_ctx; + // TODO check + peer = (struct GNUNET_PeerIdentity *) cls; peer_ctx = get_peer_ctx (peer_map, peer); peer_ctx->peer_flags |= LIVING; @@ -526,7 +528,11 @@ peer_is_live (void *cls, size_t size, void *buf) GNUNET_free (peer); - buf = NULL; + //if (NULL != peer_ctx->is_live_task) + //{ + // GNUNET_CADET_notify_transmit_ready_cancel (peer_ctx->is_live_task); + // peer_ctx->is_live_task = NULL; // needed? + //} return 0; } @@ -1379,7 +1385,10 @@ peer_remove_cb (void *cls, const struct GNUNET_PeerIdentity *key, void *value) GNUNET_MQ_destroy (peer_ctx->mq); if ( NULL != peer_ctx->is_live_task) + { GNUNET_CADET_notify_transmit_ready_cancel (peer_ctx->is_live_task); + peer_ctx->is_live_task = NULL; + } if ( NULL != peer_ctx->send_channel) GNUNET_CADET_channel_destroy (peer_ctx->send_channel); -- cgit v1.2.3