]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: drop dbus queue recursion check
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Nov 2018 12:00:12 +0000 (13:00 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Nov 2018 19:09:11 +0000 (20:09 +0100)
We don't dispatch the queue recursively anymore, hence let's simplify
things a bit.

As pointed out by @fbuihuu:

https://github.com/systemd/systemd/pull/10763#discussion_r233209550

src/core/manager.c
src/core/manager.h

index a7ee6a6523c6d968062900982e43f14941546db1..d7dbf6c8a97af10309ea55916617efdc3017e5a0 100644 (file)
@@ -2157,10 +2157,6 @@ static unsigned manager_dispatch_dbus_queue(Manager *m) {
 
         assert(m);
 
-        /* Avoid recursion */
-        if (m->dispatching_dbus_queue)
-                return 0;
-
         /* When we are reloading, let's not wait with generating signals, since we need to exit the manager as quickly
          * as we can. There's no point in throttling generation of signals in that case. */
         if (MANAGER_IS_RELOADING(m) || m->send_reloading_done || m->pending_reload_message)
@@ -2189,8 +2185,6 @@ static unsigned manager_dispatch_dbus_queue(Manager *m) {
                 budget = MANAGER_BUS_MESSAGE_BUDGET;
         }
 
-        m->dispatching_dbus_queue = true;
-
         while (budget != 0 && (u = m->dbus_unit_queue)) {
 
                 assert(u->in_dbus_queue);
@@ -2212,8 +2206,6 @@ static unsigned manager_dispatch_dbus_queue(Manager *m) {
                         budget--;
         }
 
-        m->dispatching_dbus_queue = false;
-
         if (m->send_reloading_done) {
                 m->send_reloading_done = false;
                 bus_manager_send_reloading(m, false);
index 1977735da1ddab8cf041ad9179cc1dd2cb664cec..b65c4c8451f7ea9c367fbf9688cdaa3ba1f7b30f 100644 (file)
@@ -287,7 +287,6 @@ struct Manager {
 
         /* Flags */
         bool dispatching_load_queue:1;
-        bool dispatching_dbus_queue:1;
 
         bool taint_usr:1;