pos->reason |= GNUNET_SCHEDULER_REASON_TIMEOUT;
if (0 == pos->reason)
break;
- scheduler_driver->set_wakeup (scheduler_driver->cls,
- pending_timeout_head->timeout);
+
GNUNET_CONTAINER_DLL_remove (pending_timeout_head,
pending_timeout_tail,
pos);
if (pending_timeout_last == pos)
pending_timeout_last = NULL;
+ else
+ scheduler_driver->set_wakeup (scheduler_driver->cls,
+ pending_timeout_head->timeout);
queue_ready_task (pos);
}
pos = pending_head;
scheduler_driver->set_wakeup (scheduler_driver->cls,
pending_timeout_head->timeout);
}
+ //TODO check if this is redundant
if (task == pending_timeout_last)
pending_timeout_last = NULL;
}
GNUNET_CONTAINER_DLL_remove (pending_timeout_head,
pending_timeout_tail,
pos);
- scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
+
if (pending_timeout_last == pos)
pending_timeout_last = NULL;
+ else
+ scheduler_driver->set_wakeup(scheduler_driver->cls,pending_timeout_head->timeout);
+
queue_ready_task (pos);
}