diff options
author | Arman Uguray <armansito@chromium.org> | 2015-02-27 00:16:24 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-02-27 14:37:54 +0200 |
commit | 16f61b2721d683643f0dfeb1dd2e861780e80994 (patch) | |
tree | f20d6b76e9452ba0f26f7bc455d7fd1644ad3768 /gdbus/client.c | |
parent | 731e9954b36c2a34136af8b069a93fbbf95e67c2 (diff) | |
download | bluez-16f61b2721d683643f0dfeb1dd2e861780e80994.tar.gz |
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.
Diffstat (limited to 'gdbus/client.c')
-rw-r--r-- | gdbus/client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbus/client.c b/gdbus/client.c index 238b34828..cd5c7678f 100644 --- a/gdbus/client.c +++ b/gdbus/client.c @@ -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; } |