diff options
author | lurchi <lurchi@strangeplace.net> | 2018-01-16 17:27:33 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2018-01-16 17:32:25 +0100 |
commit | 7dd69dfb57154d77144bc46a393b6b95ea0f911e (patch) | |
tree | e14da15cd6a913de217ebb34210f479ae66d080c | |
parent | 5441f24ab5327f576b941e8e1e14a00270690759 (diff) | |
download | gnunet-7dd69dfb57154d77144bc46a393b6b95ea0f911e.tar.gz gnunet-7dd69dfb57154d77144bc46a393b6b95ea0f911e.zip |
remove duplicate timeout check
There's no need of checking for timeouts in GNUNET_SCHEDULER_task_ready,
as the check is done in GNUNET_SCHEDULER_run_from_driver.
-rw-r--r-- | src/util/scheduler.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index e92405a96..6d4a8b354 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -1839,12 +1839,8 @@ GNUNET_SCHEDULER_task_ready (struct GNUNET_SCHEDULER_Task *task, | |||
1839 | struct GNUNET_SCHEDULER_FdInfo *fdi) | 1839 | struct GNUNET_SCHEDULER_FdInfo *fdi) |
1840 | { | 1840 | { |
1841 | enum GNUNET_SCHEDULER_Reason reason; | 1841 | enum GNUNET_SCHEDULER_Reason reason; |
1842 | struct GNUNET_TIME_Absolute now; | ||
1843 | 1842 | ||
1844 | now = GNUNET_TIME_absolute_get (); | ||
1845 | reason = task->reason; | 1843 | reason = task->reason; |
1846 | if (now.abs_value_us >= task->timeout.abs_value_us) | ||
1847 | reason |= GNUNET_SCHEDULER_REASON_TIMEOUT; | ||
1848 | if ( (0 == (reason & GNUNET_SCHEDULER_REASON_READ_READY)) && | 1844 | if ( (0 == (reason & GNUNET_SCHEDULER_REASON_READ_READY)) && |
1849 | (0 != (GNUNET_SCHEDULER_ET_IN & fdi->et)) ) | 1845 | (0 != (GNUNET_SCHEDULER_ET_IN & fdi->et)) ) |
1850 | reason |= GNUNET_SCHEDULER_REASON_READ_READY; | 1846 | reason |= GNUNET_SCHEDULER_REASON_READ_READY; |