diff options
author | lurchi <lurchi@strangeplace.net> | 2018-01-23 09:09:27 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2018-01-23 09:09:27 +0100 |
commit | f0140aa59e7e6570deec0cde35fc0147ee1292cb (patch) | |
tree | d9ad98f8794e089d47c7dddb593928425c31f311 /src/util | |
parent | 8b64a2ffd097e1f02c6d6de3d3bd6ce75a7206f6 (diff) |
catch early return of select before call to GNUNET_SCHEDULER_run_from_driver
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/scheduler.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 6a1b1a22d8..a8d572a56f 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -25,6 +25,8 @@ #include "platform.h" #include "gnunet_util_lib.h" #include "disk.h" +// DEBUG +#include <inttypes.h> #define LOG(kind,...) GNUNET_log_from (kind, "util-scheduler", __VA_ARGS__) @@ -2333,6 +2335,19 @@ select_loop (void *cls, } } } + else + { + struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); + if (now.abs_value_us < context->timeout.abs_value_us) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "select was expected to return at %" PRIu64 ", " + "but returned already at %" PRIu64 "\n", + context->timeout.abs_value_us, + now.abs_value_us); + GNUNET_assert (0); + } + } tasks_ready = GNUNET_SCHEDULER_run_from_driver (sh); GNUNET_assert (GNUNET_SYSERR != tasks_ready); } |