diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-31 19:58:19 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-07-31 20:00:21 +0200 |
commit | 8d87d4a989e05e69ed80c0aca38fdbc6f4959cf3 (patch) | |
tree | c19a9c17bea505c1760dcaac8c9489af874cc0af /src/libsystemd/sd-bus | |
parent | b2a0ac5e5b29c73ca7c0da23369a4769d5a91ddd (diff) |
busctl: make sure --address connects as bus-client
There is really no reason to use `busctl` to connect to legacy private
bus endpoints. Fix this and make sure `busctl --address=unix:path=/foo`
works!
Diffstat (limited to 'src/libsystemd/sd-bus')
-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 6aaaf0e5ec..017a0d8f17 100644 --- a/src/libsystemd/sd-bus/busctl.c +++ b/src/libsystemd/sd-bus/busctl.c @@ -2018,15 +2018,15 @@ int main(int argc, char *argv[]) { } } + r = sd_bus_set_bus_client(bus, true); + if (r < 0) { + log_error_errno(r, "Failed to set bus client: %m"); + goto finish; + } + 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_errno(r, "Failed to set bus client: %m"); - goto finish; - } - switch (arg_transport) { case BUS_TRANSPORT_LOCAL: |