From: Christian Grothoff Date: Mon, 18 Jan 2010 16:17:25 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~22935 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c255a98a2efcfa2b8e3a1bfb26515083550a9a84;p=oweals%2Fgnunet.git fix --- diff --git a/src/core/core_api.c b/src/core/core_api.c index 21ce09aec..04f5296f6 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -346,8 +346,11 @@ trigger_next_request (struct GNUNET_CORE_Handle *h) if (NULL == (th = h->pending_head)) return; /* no requests pending */ GNUNET_assert (NULL == h->th); - GNUNET_SCHEDULER_cancel (h->sched, th->timeout_task); - th->timeout_task = GNUNET_SCHEDULER_NO_TASK; + if (GNUNET_SCHEDULER_NO_TASK != th->timeout_task) + { + GNUNET_SCHEDULER_cancel (h->sched, th->timeout_task); + th->timeout_task = GNUNET_SCHEDULER_NO_TASK; + } h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, th->msize, GNUNET_TIME_absolute_get_remaining @@ -807,8 +810,7 @@ produce_send (void *cls, size_t size, void *buf) GNUNET_i2s(&th->peer)); #endif GNUNET_assert (0 == th->notify (th->notify_cls, 0, NULL)); - if (th->timeout_task != GNUNET_SCHEDULER_NO_TASK) - GNUNET_CORE_notify_transmit_ready_cancel (th); + GNUNET_CORE_notify_transmit_ready_cancel (th); trigger_next_request (h); return 0; }