From 79ae099456caba64b0599b7c6e2b2b86bcc6571f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 May 2011 21:40:07 +0000 Subject: [PATCH] more extensive error reporting --- src/util/scheduler.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 2f300f4bd..81f7d8cf0 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -911,7 +911,13 @@ GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task) while (t == NULL) { p++; - GNUNET_assert (p < GNUNET_SCHEDULER_PRIORITY_COUNT); + if (p >= GNUNET_SCHEDULER_PRIORITY_COUNT) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Attempt to cancel dead task %llu!\n"), + (unsigned long long) task); + GNUNET_assert (0); + } prev = NULL; t = ready[p]; while (t != NULL) -- 2.25.1