diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-18 16:36:14 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-18 19:57:44 +0100 |
commit | 99cde098f892de0ff11947fa5e7d309da274b111 (patch) | |
tree | 119a911a346393c41ee019a0e6bd65fccd1ca7e5 /src/shared/bus-util.c | |
parent | man: describe sd_bus_default_flush_close() (diff) | |
download | systemd-99cde098f892de0ff11947fa5e7d309da274b111.tar.xz systemd-99cde098f892de0ff11947fa5e7d309da274b111.zip |
bus: drop dead code for kdbus support
sd_bus_try_close() always returns -EOPNOTSUPP if bus is a valid object.
It nevers returns -EBUSY. So we'd always go into the "fallback" path.
Diffstat (limited to '')
-rw-r--r-- | src/shared/bus-util.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index 8e6a6e2ce2..4b0a3a3e31 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -115,36 +115,16 @@ int bus_event_loop_with_idle( return r; if (r == 0 && !exiting && idle) { + /* Inform the service manager that we are going down, so that it will queue all + * further start requests, instead of assuming we are already running. */ + sd_notify(false, "STOPPING=1"); - r = sd_bus_try_close(bus); - if (r == -EBUSY) - continue; - - /* Fallback for dbus1 connections: we - * unregister the name and wait for the - * response to come through for it */ - if (r == -EOPNOTSUPP) { - - /* Inform the service manager that we - * are going down, so that it will - * queue all further start requests, - * instead of assuming we are already - * running. */ - sd_notify(false, "STOPPING=1"); - - r = bus_async_unregister_and_exit(e, bus, name); - if (r < 0) - return r; - - exiting = true; - continue; - } - + r = bus_async_unregister_and_exit(e, bus, name); if (r < 0) return r; - sd_event_exit(e, 0); - break; + exiting = true; + continue; } } |