summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);