summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-05 02:48:17 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-05 02:48:17 +0100
commit2f671520ebade4877cbf6aca3572a5f8c4e1871d (patch)
tree37259dc67d0d2be61dbc488410e9606dddc01af8 /src
parentc1b9d935725103e95901f347b8981647ce4dd546 (diff)
busname: improve condition check
Diffstat (limited to 'src')
-rw-r--r--src/core/busname.c19
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);
}