summaryrefslogtreecommitdiff
path: root/src/timer.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-01 00:31:53 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-01 00:31:53 +0200
commit6124958c7bda3fed9b079e8217781480797703f5 (patch)
tree7e5b47c29fa4c7cfe24c7798091d3561e3231cca /src/timer.c
parent4fd5948e74b776b6d68ba55f558da5f354179e52 (diff)
unit: add new abstracted maintenance state for units
Diffstat (limited to 'src/timer.c')
-rw-r--r--src/timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timer.c b/src/timer.c
index ead8ab92a4..96c6e8e8ed 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -31,7 +31,7 @@ static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = {
[TIMER_WAITING] = UNIT_ACTIVE,
[TIMER_RUNNING] = UNIT_ACTIVE,
[TIMER_ELAPSED] = UNIT_ACTIVE,
- [TIMER_MAINTENANCE] = UNIT_INACTIVE
+ [TIMER_MAINTENANCE] = UNIT_INACTIVE_MAINTENANCE
};
static void timer_init(Unit *u) {
@@ -401,7 +401,7 @@ void timer_unit_notify(Unit *u, UnitActiveState new_state) {
case TIMER_RUNNING:
- if (new_state == UNIT_INACTIVE) {
+ if (UNIT_IS_INACTIVE_OR_MAINTENANCE(new_state)) {
log_debug("%s got notified about unit deactivation.", t->meta.id);
timer_enter_waiting(t, false);
}