diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-bus/busctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c index 4da8074375..809940a2d5 100644 --- a/src/libsystemd/sd-bus/busctl.c +++ b/src/libsystemd/sd-bus/busctl.c @@ -1612,6 +1612,12 @@ int main(int argc, char *argv[]) { if (arg_address) r = sd_bus_set_address(bus, arg_address); else { + r = sd_bus_set_bus_client(bus, true); + if (r < 0) { + log_error("Failed to set bus client: %s", strerror(-r)); + goto finish; + } + switch (arg_transport) { case BUS_TRANSPORT_LOCAL: @@ -1638,12 +1644,6 @@ int main(int argc, char *argv[]) { goto finish; } - r = sd_bus_set_bus_client(bus, true); - if (r < 0) { - log_error("Failed to set bus client: %s", strerror(-r)); - goto finish; - } - r = sd_bus_start(bus); if (r < 0) { log_error("Failed to connect to bus: %s", strerror(-r)); |