]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/service: avoid duplicate unit_add_to_dbus_queue() call
authorMike Yuan <me@yhndnzj.com>
Sun, 19 Oct 2025 19:26:48 +0000 (21:26 +0200)
committerMike Yuan <me@yhndnzj.com>
Tue, 4 Nov 2025 11:17:31 +0000 (12:17 +0100)
If we're changing state anyways, service_set_state() -> unit_notify()
will take care of dbus signaling for us.

src/core/service.c

index df89534a452126d131635d61971385ad38530f43..49c4b52af18d89752cc310d4198a1e97409d65a0 100644 (file)
@@ -4806,8 +4806,6 @@ static void service_notify_message(
                 if (IN_SET(s->state, SERVICE_RUNNING, SERVICE_RELOAD_SIGNAL, SERVICE_RELOAD_NOTIFY, SERVICE_REFRESH_EXTENSIONS))
                         service_enter_stop_by_notify(s);
 
-                notify_dbus = true;
-
         } else if (strv_contains(tags, "READY=1")) {
 
                 s->notify_state = NOTIFY_READY;
@@ -4842,8 +4840,6 @@ static void service_notify_message(
                 if (s->state == SERVICE_RELOAD_NOTIFY)
                         service_enter_running(s, SERVICE_SUCCESS);
 
-                notify_dbus = true;
-
         } else if (strv_contains(tags, "RELOADING=1")) {
 
                 s->notify_state = NOTIFY_RELOADING;
@@ -4861,8 +4857,6 @@ static void service_notify_message(
 
                 if (s->state == SERVICE_RUNNING)
                         service_enter_reload_by_notify(s);
-
-                notify_dbus = true;
         }
 
         /* Interpret STATUS= */