diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-05-25 22:07:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-05-25 22:07:58 +0000 |
commit | 06c825ca2839bc902e29efb99dc21b4d7de3364f (patch) | |
tree | 0ab557710909ce9143191ccdd6697c4adb426d0b /src/fs/gnunet-service-fs_cp.c | |
parent | 9bd50c74256270eca5947f09770ef8845387797e (diff) | |
download | gnunet-06c825ca2839bc902e29efb99dc21b4d7de3364f.tar.gz gnunet-06c825ca2839bc902e29efb99dc21b4d7de3364f.zip |
cancel task on timeout
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 6 |
1 files changed, 5 insertions, 1 deletions
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, | |||
1232 | GNUNET_assert (0 < cp->ppd.pending_replies--); | 1232 | GNUNET_assert (0 < cp->ppd.pending_replies--); |
1233 | GNUNET_LOAD_update (cp->ppd.transmission_delay, | 1233 | GNUNET_LOAD_update (cp->ppd.transmission_delay, |
1234 | UINT64_MAX); | 1234 | UINT64_MAX); |
1235 | if (NULL != pth->cth) | ||
1236 | { | ||
1237 | GNUNET_CORE_notify_transmit_ready_cancel (pth->cth); | ||
1238 | pth->cth = NULL; | ||
1239 | } | ||
1235 | pth->gmc (pth->gmc_cls, | 1240 | pth->gmc (pth->gmc_cls, |
1236 | 0, NULL); | 1241 | 0, NULL); |
1237 | GNUNET_free (pth); | 1242 | GNUNET_free (pth); |
@@ -1296,7 +1301,6 @@ GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, | |||
1296 | cp->ppd.pending_queries++; | 1301 | cp->ppd.pending_queries++; |
1297 | else if (GNUNET_NO == is_query) | 1302 | else if (GNUNET_NO == is_query) |
1298 | cp->ppd.pending_replies++; | 1303 | cp->ppd.pending_replies++; |
1299 | |||
1300 | pth->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout, | 1304 | pth->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout, |
1301 | &peer_transmit_timeout, | 1305 | &peer_transmit_timeout, |
1302 | pth); | 1306 | pth); |