Check return value of g_dbus_connection_register_object(), use GCancellable
@davidk
Submitted by David King Link to original bug (#704787)
Description
As noticed by Bastien in bug 692771, comment 20, some uses of g_dbus_connection_register_object() do not check the return value, where 0 indicates an error. The power plugin is one such example:
plugins/power/gsd-power-manager.c:3876
GCancellable should also be used, for instance with the g_dbus_proxy_new_for_bus_sync() calls on line 3304, 3351 and 3362.