From c255a98a2efcfa2b8e3a1bfb26515083550a9a84 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 18 Jan 2010 16:17:25 +0000 Subject: [PATCH] fix --- src/core/core_api.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } -- 2.25.1