diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-05 02:48:17 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-05 02:48:17 +0100 |
commit | 2f671520ebade4877cbf6aca3572a5f8c4e1871d (patch) | |
tree | 37259dc67d0d2be61dbc488410e9606dddc01af8 /src/core/busname.c | |
parent | c1b9d935725103e95901f347b8981647ce4dd546 (diff) |
busname: improve condition check
Diffstat (limited to 'src/core/busname.c')
-rw-r--r-- | src/core/busname.c | 19 |
1 files changed, 7 insertions, 12 deletions
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); } |