remove duplicate timeout check
authorlurchi <lurchi@strangeplace.net>
Tue, 16 Jan 2018 16:27:33 +0000 (17:27 +0100)
committerlurchi <lurchi@strangeplace.net>
Tue, 16 Jan 2018 16:32:25 +0000 (17:32 +0100)
There's no need of checking for timeouts in GNUNET_SCHEDULER_task_ready,
as the check is done in GNUNET_SCHEDULER_run_from_driver.

src/util/scheduler.c

index e92405a96cfe863d3b43fbd4840c347b48b28659..6d4a8b354746e9384135a8918a81c3af5f389eb0 100644 (file)
@@ -1839,12 +1839,8 @@ GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task,
                              struct GNUNET_SCHEDULER_FdInfo *fdi)
 {
   enum GNUNET_SCHEDULER_Reason reason;
-  struct GNUNET_TIME_Absolute now;
 
-  now = GNUNET_TIME_absolute_get ();
   reason = task->reason;
-  if (now.abs_value_us >= task->timeout.abs_value_us)
-    reason |= GNUNET_SCHEDULER_REASON_TIMEOUT;
   if ( (0 == (reason & GNUNET_SCHEDULER_REASON_READ_READY)) &&
        (0 != (GNUNET_SCHEDULER_ET_IN & fdi->et)) )
     reason |= GNUNET_SCHEDULER_REASON_READ_READY;