[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13286 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13286 - gnunet/src/core |
Date: |
Fri, 15 Oct 2010 14:11:44 +0200 |
Author: nevans
Date: 2010-10-15 14:11:44 +0200 (Fri, 15 Oct 2010)
New Revision: 13286
Modified:
gnunet/src/core/core_api.c
Log:
core_api possible fix for timeout case
Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c 2010-10-15 09:16:14 UTC (rev 13285)
+++ gnunet/src/core/core_api.c 2010-10-15 12:11:44 UTC (rev 13286)
@@ -292,6 +292,9 @@
{
struct GNUNET_CORE_TransmitHandle *th = cls;
+ GNUNET_CONTAINER_DLL_remove (th->ch->pending_head,
+ th->ch->pending_tail,
+ th);
th->timeout_task = GNUNET_SCHEDULER_NO_TASK;
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -323,6 +326,8 @@
return 0;
if (buf == NULL)
{
+ if (th->timeout_task != GNUNET_SCHEDULER_NO_TASK)
+ GNUNET_SCHEDULER_cancel(h->sched, th->timeout_task);
timeout_request (th, NULL);
return 0;
}
@@ -844,7 +849,13 @@
#endif
GNUNET_assert (0 == th->notify (th->notify_cls, 0, NULL));
GNUNET_CORE_notify_transmit_ready_cancel (th);
- trigger_next_request (h);
+ if ((h->pending_head == th) && (h->cth != NULL)) /* Request hasn't been
canceled yet! */
+ {
+ GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth);
+ h->cth = NULL;
+ trigger_next_request (h);
+ }
+ /* Otherwise this request timed out, but another is actually queued for
sending, so don't try to send another! */
return 0;
}
sm = (struct SendMessage *) buf;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13286 - gnunet/src/core,
gnunet <=