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:
Arman Uguray 2015-02-27 00:16:24 -08:00 committed by Marcel Holtmann
parent cede3700f7
commit 26a00f2f31
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}