summaryrefslogtreecommitdiff
path: root/gdbus/client.c
diff options
context:
space:
mode:
authorArman Uguray <armansito@chromium.org>2015-02-27 00:16:24 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-02-27 14:37:54 +0200
commit16f61b2721d683643f0dfeb1dd2e861780e80994 (patch)
treef20d6b76e9452ba0f26f7bc455d7fd1644ad3768 /gdbus/client.c
parent731e9954b36c2a34136af8b069a93fbbf95e67c2 (diff)
downloadbluez-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.c3
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;
}