From 0e1db619d8621ed62d9798398bce8f3121c3f5ae Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 4 Nov 2009 15:13:26 +0000 Subject: [PATCH] fix --- src/arm/gnunet-service-arm.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index eae24dd2a..f907d944f 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c @@ -673,18 +673,20 @@ maint (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) unsigned long statusCode; next = pos->next; - if (pos->pid == 0) - { + if ( (NULL != pos->kill_continuation) || + ( (GNUNET_YES == in_shutdown) && + (pos->pid == 0) ) ) + { + if (prev == NULL) + running = next; + else + prev->next = next; if (NULL != pos->kill_continuation) - { - if (prev == NULL) - running = next; - else - prev->next = next; - pos->kill_continuation (pos->kill_continuation_cls, pos); - } + pos->kill_continuation (pos->kill_continuation_cls, pos); + else + free_entry (pos); continue; - } + } if ( (GNUNET_SYSERR == (ret = GNUNET_OS_process_status(pos->pid, &statusType, &statusCode))) || @@ -710,20 +712,6 @@ maint (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) statstr = _( /* process termination method */ "unknown"); statcode = 0; } - if ( (NULL != pos->kill_continuation) || - ( (GNUNET_YES == in_shutdown) && - (pos->pid == 0) ) ) - { - if (prev == NULL) - running = next; - else - prev->next = next; - if (NULL != pos->kill_continuation) - pos->kill_continuation (pos->kill_continuation_cls, pos); - else - free_entry (pos); - continue; - } if (GNUNET_YES != in_shutdown) GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Service `%s' terminated with status %s/%d, will try to restart it!\n"), -- 2.25.1