mirror of git://git.sysmocom.de/ofono
gdbus/client: Don't GetManagedObjects w/o handlers
The client code currently issues GetManagedObjects if new handlers are set via g_dbus_client_set_proxy_handlers. An application may set these to NULL before unref'ing a client or to simply prevent further events. Hence, there is no need to refresh objects or properties if all handlers are NULL.
This commit is contained in:
parent
cede3700f7
commit
26a00f2f31
|
@ -1374,7 +1374,8 @@ gboolean g_dbus_client_set_proxy_handlers(GDBusClient *client,
|
|||
client->property_changed = property_changed;
|
||||
client->user_data = user_data;
|
||||
|
||||
get_managed_objects(client);
|
||||
if (proxy_added || proxy_removed || property_changed)
|
||||
get_managed_objects(client);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue