diff options
Diffstat (limited to 'src/core/unit.c')
-rw-r--r-- | src/core/unit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 29b07a6e7a..e0d54d8fe1 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -5829,7 +5829,7 @@ void unit_frozen(Unit *u) { u->freezer_state = FREEZER_FROZEN; - bus_unit_send_pending_freezer_message(u); + bus_unit_send_pending_freezer_message(u, false); } void unit_thawed(Unit *u) { @@ -5837,7 +5837,7 @@ void unit_thawed(Unit *u) { u->freezer_state = FREEZER_RUNNING; - bus_unit_send_pending_freezer_message(u); + bus_unit_send_pending_freezer_message(u, false); } static int unit_freezer_action(Unit *u, FreezerAction action) { @@ -5862,7 +5862,8 @@ static int unit_freezer_action(Unit *u, FreezerAction action) { if (s != UNIT_ACTIVE) return -EHOSTDOWN; - if (IN_SET(u->freezer_state, FREEZER_FREEZING, FREEZER_THAWING)) + if ((IN_SET(u->freezer_state, FREEZER_FREEZING, FREEZER_THAWING) && action == FREEZER_FREEZE) || + (u->freezer_state == FREEZER_THAWING && action == FREEZER_THAW)) return -EALREADY; r = method(u); |