From 06c825ca2839bc902e29efb99dc21b4d7de3364f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 May 2011 22:07:58 +0000 Subject: [PATCH] cancel task on timeout --- src/fs/gnunet-service-fs_cp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 7508ea324..519e897c5 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c @@ -1232,6 +1232,11 @@ peer_transmit_timeout (void *cls, GNUNET_assert (0 < cp->ppd.pending_replies--); GNUNET_LOAD_update (cp->ppd.transmission_delay, UINT64_MAX); + if (NULL != pth->cth) + { + GNUNET_CORE_notify_transmit_ready_cancel (pth->cth); + pth->cth = NULL; + } pth->gmc (pth->gmc_cls, 0, NULL); GNUNET_free (pth); @@ -1296,7 +1301,6 @@ GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, cp->ppd.pending_queries++; else if (GNUNET_NO == is_query) cp->ppd.pending_replies++; - pth->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout, &peer_transmit_timeout, pth); -- 2.25.1