diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-03 20:31:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-03 20:31:34 +0100 |
commit | c0a0913218f900e76984179ab959d8fb12bef1fb (patch) | |
tree | f16802c02d583d0fd3d00447cc6b6f39b66df666 /src/libsystemd-bus | |
parent | a6aa89122d2fa5e811a72200773068c13bfffea2 (diff) |
bus: fix parsing of AcquireName() response
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r-- | src/libsystemd-bus/bus-control.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c index d98a4ddf25..7a772ff49f 100644 --- a/src/libsystemd-bus/bus-control.c +++ b/src/libsystemd-bus/bus-control.c @@ -110,10 +110,10 @@ static int bus_request_name_dbus1(sd_bus *bus, const char *name, unsigned flags) return -EEXIST; else if (ret == BUS_NAME_IN_QUEUE) return 0; - else - return -EIO; + else if (ret == BUS_NAME_PRIMARY_OWNER) + return 1; - return 1; + return -EIO; } _public_ int sd_bus_request_name(sd_bus *bus, const char *name, unsigned flags) { |