summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormsizanoen1 <msizanoen@qtmlabs.xyz>2022-12-08 02:35:32 +0100
committermsizanoen1 <msizanoen@qtmlabs.xyz>2022-12-08 12:58:00 +0100
commitaf1e336589dc5db78fdfa56c6a7efb86a9196a90 (patch)
tree031f6cc9576153e0eb1afb0c1b45513045782b41 /src
parent432a32117506657186e16bd8e0642bbb30326bc4 (diff)
downloadsystemd-af1e336589dc5db78fdfa56c6a7efb86a9196a90.tar.gz
core: pending_freezer_{message => invocation}
Rename the field to reflect the new semantics.
Diffstat (limited to 'src')
-rw-r--r--src/core/dbus-unit.c14
-rw-r--r--src/core/dbus.c4
-rw-r--r--src/core/unit.c2
-rw-r--r--src/core/unit.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 0702373ab0..1ef98da6fd 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -782,12 +782,12 @@ static int bus_unit_method_freezer_generic(sd_bus_message *message, void *userda
if (r == 0)
reply_no_delay = true;
- if (u->pending_freezer_message) {
+ if (u->pending_freezer_invocation) {
bus_unit_send_pending_freezer_message(u, true);
- assert(!u->pending_freezer_message);
+ assert(!u->pending_freezer_invocation);
}
- u->pending_freezer_message = sd_bus_message_ref(message);
+ u->pending_freezer_invocation = sd_bus_message_ref(message);
if (reply_no_delay) {
r = bus_unit_send_pending_freezer_message(u, false);
@@ -1668,17 +1668,17 @@ int bus_unit_send_pending_freezer_message(Unit *u, bool cancelled) {
assert(u);
- if (!u->pending_freezer_message)
+ if (!u->pending_freezer_invocation)
return 0;
if (cancelled)
r = sd_bus_message_new_method_error(
- u->pending_freezer_message,
+ u->pending_freezer_invocation,
&reply,
&SD_BUS_ERROR_MAKE_CONST(
BUS_ERROR_FREEZE_CANCELLED, "Freeze operation aborted"));
else
- r = sd_bus_message_new_method_return(u->pending_freezer_message, &reply);
+ r = sd_bus_message_new_method_return(u->pending_freezer_invocation, &reply);
if (r < 0)
return r;
@@ -1686,7 +1686,7 @@ int bus_unit_send_pending_freezer_message(Unit *u, bool cancelled) {
if (r < 0)
log_warning_errno(r, "Failed to send queued message, ignoring: %m");
- u->pending_freezer_message = sd_bus_message_unref(u->pending_freezer_message);
+ u->pending_freezer_invocation = sd_bus_message_unref(u->pending_freezer_invocation);
return 0;
}
diff --git a/src/core/dbus.c b/src/core/dbus.c
index 141c3ffe12..0bf2391b03 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -998,8 +998,8 @@ static void destroy_bus(Manager *m, sd_bus **bus) {
u->bus_track = sd_bus_track_unref(u->bus_track);
/* Get rid of pending freezer messages on this bus */
- if (u->pending_freezer_message && sd_bus_message_get_bus(u->pending_freezer_message) == *bus)
- u->pending_freezer_message = sd_bus_message_unref(u->pending_freezer_message);
+ if (u->pending_freezer_invocation && sd_bus_message_get_bus(u->pending_freezer_invocation) == *bus)
+ u->pending_freezer_invocation = sd_bus_message_unref(u->pending_freezer_invocation);
}
/* Get rid of queued message on this bus */
diff --git a/src/core/unit.c b/src/core/unit.c
index e0d54d8fe1..b052402cfb 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -687,7 +687,7 @@ Unit* unit_free(Unit *u) {
u->match_bus_slot = sd_bus_slot_unref(u->match_bus_slot);
u->bus_track = sd_bus_track_unref(u->bus_track);
u->deserialized_refs = strv_free(u->deserialized_refs);
- u->pending_freezer_message = sd_bus_message_unref(u->pending_freezer_message);
+ u->pending_freezer_invocation = sd_bus_message_unref(u->pending_freezer_invocation);
unit_free_requires_mounts_for(u);
diff --git a/src/core/unit.h b/src/core/unit.h
index 3bc7de3d1c..58417ebd0e 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -239,7 +239,7 @@ typedef struct Unit {
FILE *transient_file;
/* Freezer state */
- sd_bus_message *pending_freezer_message;
+ sd_bus_message *pending_freezer_invocation;
FreezerState freezer_state;
/* Job timeout and action to take */