[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34951 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34951 - gnunet/src/rps |
Date: |
Thu, 22 Jan 2015 12:49:19 +0100 |
Author: ch3
Date: 2015-01-22 12:49:19 +0100 (Thu, 22 Jan 2015)
New Revision: 34951
Modified:
gnunet/src/rps/gnunet-service-rps.c
Log:
clean up ntfy_tmt_rdy handles on removal of peer
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-01-22 00:18:44 UTC (rev 34950)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-01-22 11:49:19 UTC (rev 34951)
@@ -168,6 +168,13 @@
//size_t num_outstanding_ops;
/**
+ * Handle to the callback given to cadet_ntfy_tmt_rdy()
+ *
+ * To be canceled on shutdown.
+ */
+ struct GNUNET_CADET_TransmitHandle *is_live_task;
+
+ /**
* This is pobably followed by 'statistical' data (when we first saw
* him, how did we get his ID, how many pushes (in a timeinterval),
* ...)
@@ -501,9 +508,9 @@
{
tmp_peer = GNUNET_new (struct GNUNET_PeerIdentity);
*tmp_peer = *peer;
- (void) GNUNET_CADET_notify_transmit_ready (ctx->send_channel, GNUNET_NO,
- GNUNET_TIME_UNIT_FOREVER_REL,
- 0, peer_is_live, tmp_peer);
+ ctx->is_live_task = GNUNET_CADET_notify_transmit_ready
(ctx->send_channel, GNUNET_NO,
+
GNUNET_TIME_UNIT_FOREVER_REL,
+ 0, peer_is_live,
tmp_peer);
}
// do I have to explicitly put it in the peer_map?
@@ -1259,6 +1266,9 @@
if ( NULL != peer_ctx->mq)
GNUNET_MQ_destroy (peer_ctx->mq);
+ if ( NULL != peer_ctx->is_live_task)
+ GNUNET_CADET_notify_transmit_ready_cancel (peer_ctx->is_live_task);
+
if ( NULL != peer_ctx->send_channel)
GNUNET_CADET_channel_destroy (peer_ctx->send_channel);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34951 - gnunet/src/rps,
gnunet <=