Commit 73894602 authored by Simon McVittie's avatar Simon McVittie

bus_service_list_queued_owners: Don't return a DBusError

This makes it clearer that the only possible error is out-of-memory,
so its use in ListQueuedOwners() is not leaking information to callers
that might not be allowed to know the difference between "doesn't exist"
and "exists but you are not allowed to know that".
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105656
parent f67509cb
......@@ -1581,10 +1581,11 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection,
}
else
{
if (!bus_service_list_queued_owners (service,
&base_names,
error))
goto failed;
if (!bus_service_list_queued_owners (service, &base_names))
{
BUS_SET_OOM (error);
goto failed;
}
}
_dbus_assert (base_names != NULL);
......
......@@ -1289,8 +1289,7 @@ bus_service_has_owner (BusService *service,
dbus_bool_t
bus_service_list_queued_owners (BusService *service,
DBusList **return_list,
DBusError *error)
DBusList **return_list)
{
DBusList *link;
......@@ -1317,6 +1316,5 @@ bus_service_list_queued_owners (BusService *service,
oom:
_dbus_list_clear (return_list);
BUS_SET_OOM (error);
return FALSE;
}
......@@ -87,8 +87,7 @@ BusOwner* bus_service_get_primary_owner (BusService *service);
dbus_bool_t bus_service_get_allow_replacement (BusService *service);
const char* bus_service_get_name (BusService *service);
dbus_bool_t bus_service_list_queued_owners (BusService *service,
DBusList **return_list,
DBusError *error);
DBusList **return_list);
DBusConnection* bus_service_get_primary_owners_connection (BusService *service);
#endif /* BUS_SERVICES_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment