summaryrefslogtreecommitdiffstats
path: root/gdbus
diff options
context:
space:
mode:
authorArman Uguray <armansito@chromium.org>2015-02-27 00:16:24 -0800
committerMarcel Holtmann <marcel@holtmann.org>2015-03-26 10:02:05 +0100
commit26a00f2f31225b9ec8564a9fc6c3987480e47e36 (patch)
treefd476e844a89d921fc1c63de9e93a5305518a9f6 /gdbus
parentcede3700f7903e55361281c71b6ea56a08e4e3f7 (diff)
downloadofono-26a00f2f31225b9ec8564a9fc6c3987480e47e36.tar.bz2
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')
-rw-r--r--gdbus/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbus/client.c b/gdbus/client.c
index 238b3482..cd5c7678 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;
}