summaryrefslogtreecommitdiff
path: root/src/bus-driverd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-21 18:35:27 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-21 18:35:27 +0100
commit050eb34da8bfe26ecdbda072ce945210279a9753 (patch)
tree09c2751eff8b57c700a3b30ffa18039c62b702fb /src/bus-driverd
parent908b8720b8df3044b2398f14e5ce0c9a0b1e07dd (diff)
driverd: properly handle NameHasOwner() for unique names
Diffstat (limited to 'src/bus-driverd')
-rw-r--r--src/bus-driverd/bus-driverd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c
index b9c87d1bf3..8dd3418f01 100644
--- a/src/bus-driverd/bus-driverd.c
+++ b/src/bus-driverd/bus-driverd.c
@@ -555,17 +555,17 @@ static int driver_list_queued_owners(sd_bus *bus, sd_bus_message *m, void *userd
}
static int driver_name_has_owner(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) {
- char *arg0;
+ const char *name;
int r;
- r = sd_bus_message_read(m, "s", &arg0);
+ r = sd_bus_message_read(m, "s", &name);
if (r < 0)
return r;
- assert_return(service_name_is_valid(arg0), -EINVAL);
+ assert_return(service_name_is_valid(name), -EINVAL);
- r = sd_bus_get_owner(bus, arg0, 0, NULL);
- if (r < 0 && r != -ENOENT)
+ r = sd_bus_get_owner(bus, name, 0, NULL);
+ if (r < 0 && r != -ENOENT && r != -ENXIO)
return r;
return sd_bus_reply_method_return(m, "b", r >= 0);