diff options
author | Arman Uguray <armansito@chromium.org> | 2015-02-27 00:16:24 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-03-26 10:02:41 +0100 |
commit | 1545d48bf2f178ed8d3edb0cd580d8d90710198a (patch) | |
tree | f87b8d301ce9513398cb072f0c7a937ca92cfa70 | |
parent | b93b6037b7b0b3964c28a1c0721f6726e7c1cf21 (diff) | |
download | mmsd-1545d48bf2f178ed8d3edb0cd580d8d90710198a.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.
-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 238b348..cd5c767 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; } |