summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-07-31 20:24:47 +0200
committerLennart Poettering <lennart@poettering.net>2015-07-31 20:24:47 +0200
commit58d5d500d83d51307fd580c788a5ca3a9f4cb96c (patch)
treed3e21df3e142e4a1a13387c709a834297901a65f
parent36fd91826011fa8877c4b7f198e7179bfa0162b2 (diff)
parent8d87d4a989e05e69ed80c0aca38fdbc6f4959cf3 (diff)
Merge pull request #813 from dvdhrm/bus-client
busctl: make sure --address connects as bus-client
-rw-r--r--src/libsystemd/sd-bus/busctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c
index 1724292bbb..a1f0f30d6c 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/libsystemd/sd-bus/busctl.c
@@ -2006,15 +2006,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: