From 2f671520ebade4877cbf6aca3572a5f8c4e1871d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 5 Dec 2013 02:48:17 +0100 Subject: busname: improve condition check --- src/core/busname.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/busname.c b/src/core/busname.c index c45265658c..49a43feb37 100644 --- a/src/core/busname.c +++ b/src/core/busname.c @@ -519,18 +519,13 @@ static void busname_trigger_notify(Unit *u, Unit *other) { s = SERVICE(other); - if (s->state == SERVICE_FAILED) { - if (s->result == SERVICE_FAILURE_START_LIMIT) - busname_enter_dead(n, BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT); - else - busname_enter_listening(n); - } - - if (IN_SET(n->state, - SERVICE_DEAD, - SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL, - SERVICE_STOP_POST, SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL, - SERVICE_AUTO_RESTART)) + if (s->state == SERVICE_FAILED && s->result == SERVICE_FAILURE_START_LIMIT) + busname_enter_dead(n, BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT); + else if (IN_SET(s->state, + SERVICE_DEAD, SERVICE_FAILED, + SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL, + SERVICE_STOP_POST, SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL, + SERVICE_AUTO_RESTART)) busname_enter_listening(n); } -- cgit v1.2.3-54-g00ecf