diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-11-04 15:13:26 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-11-04 15:13:26 +0000 |
commit | 0e1db619d8621ed62d9798398bce8f3121c3f5ae (patch) | |
tree | 67d00a62363aede8a85b843dd203e11e5331524e /src | |
parent | cefbb8576a9480689630f60f58ecbb0bab837f3d (diff) | |
download | gnunet-0e1db619d8621ed62d9798398bce8f3121c3f5ae.tar.gz gnunet-0e1db619d8621ed62d9798398bce8f3121c3f5ae.zip |
fix
Diffstat (limited to 'src')
-rw-r--r-- | src/arm/gnunet-service-arm.c | 36 |
1 files 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) | |||
673 | unsigned long statusCode; | 673 | unsigned long statusCode; |
674 | 674 | ||
675 | next = pos->next; | 675 | next = pos->next; |
676 | if (pos->pid == 0) | 676 | if ( (NULL != pos->kill_continuation) || |
677 | { | 677 | ( (GNUNET_YES == in_shutdown) && |
678 | (pos->pid == 0) ) ) | ||
679 | { | ||
680 | if (prev == NULL) | ||
681 | running = next; | ||
682 | else | ||
683 | prev->next = next; | ||
678 | if (NULL != pos->kill_continuation) | 684 | if (NULL != pos->kill_continuation) |
679 | { | 685 | pos->kill_continuation (pos->kill_continuation_cls, pos); |
680 | if (prev == NULL) | 686 | else |
681 | running = next; | 687 | free_entry (pos); |
682 | else | ||
683 | prev->next = next; | ||
684 | pos->kill_continuation (pos->kill_continuation_cls, pos); | ||
685 | } | ||
686 | continue; | 688 | continue; |
687 | } | 689 | } |
688 | if ( (GNUNET_SYSERR == (ret = GNUNET_OS_process_status(pos->pid, | 690 | if ( (GNUNET_SYSERR == (ret = GNUNET_OS_process_status(pos->pid, |
689 | &statusType, | 691 | &statusType, |
690 | &statusCode))) || | 692 | &statusCode))) || |
@@ -710,20 +712,6 @@ maint (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
710 | statstr = _( /* process termination method */ "unknown"); | 712 | statstr = _( /* process termination method */ "unknown"); |
711 | statcode = 0; | 713 | statcode = 0; |
712 | } | 714 | } |
713 | if ( (NULL != pos->kill_continuation) || | ||
714 | ( (GNUNET_YES == in_shutdown) && | ||
715 | (pos->pid == 0) ) ) | ||
716 | { | ||
717 | if (prev == NULL) | ||
718 | running = next; | ||
719 | else | ||
720 | prev->next = next; | ||
721 | if (NULL != pos->kill_continuation) | ||
722 | pos->kill_continuation (pos->kill_continuation_cls, pos); | ||
723 | else | ||
724 | free_entry (pos); | ||
725 | continue; | ||
726 | } | ||
727 | if (GNUNET_YES != in_shutdown) | 715 | if (GNUNET_YES != in_shutdown) |
728 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 716 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
729 | _("Service `%s' terminated with status %s/%d, will try to restart it!\n"), | 717 | _("Service `%s' terminated with status %s/%d, will try to restart it!\n"), |