[PATCH BlueZ v1 02/17] gdbus/client: Don't GetManagedObjects w/o handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 gdbus/client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 }
-- 
2.2.0.rc0.207.ga3a616c

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux