Thread (37 messages) flat view 37 messages, 3 authors, 2011-07-27

[RFC BlueZ 04/12] Notify the GAttrib instance if already connected

From: Claudio Takahasi <hidden>
Date: 2011-07-05 13:56:00
Subsystem: the rest · Maintainer: Linus Torvalds

When registering the connect and disconnect callbacks for ATT, GAttrib
instance should be informed to the caller if the link is up.
---
 src/device.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/device.c b/src/device.c
index b14e6e7..eeeb25f 100644
--- a/src/device.c
+++ b/src/device.c
@@ -132,6 +132,7 @@ struct btd_device {
 	struct bonding_req *bonding;
 	struct authentication_req *authr;	/* authentication request */
 	GSList		*disconnects;		/* disconnects message */
+	GAttrib		*attrib;
 	GSList		*attios;
 
 	gboolean	connected;
@@ -2475,6 +2476,9 @@ guint btd_device_add_attio_callback(struct btd_device *device,
 
 	device->attios = g_slist_append(device->attios, attio);
 
+	if (device->attrib && func)
+		func(device->attrib, user_data);
+
 	return attio->id;
 }
 
-- 
1.7.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help