diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-06-18 19:19:41 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-06-18 19:19:41 +0000 |
commit | 55f361392da5f648f0e3c8c1e623152de4850a0a (patch) | |
tree | e10a975e545bd3fd5a9e3d12400da01822124e4b /src/core | |
parent | 7d505a61a2998397a3e2ded83944202646050310 (diff) |
-fixing #2431
git-svn-id: https://gnunet.org/svn/gnunet@22084 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c index 42077f3a3a..c377aedc1b 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -1313,6 +1313,7 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork, th->priority = priority; th->msize = notify_size; th->cork = cork; + GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pr->ntr_task); pr->ntr_task = GNUNET_SCHEDULER_add_now (&run_request_next_transmission, pr); LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmission request added to queue\n"); @@ -1353,6 +1354,11 @@ GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle *th) * us from the 'ready' list */ GNUNET_CONTAINER_DLL_remove (h->ready_peer_head, h->ready_peer_tail, pr); } + if (GNUNET_SCHEDULER_NO_TASK != pr->ntr_task) + { + GNUNET_SCHEDULER_cancel (pr->ntr_task); + pr->ntr_task = GNUNET_SCHEDULER_NO_TASK; + } } |