From 1557acd733b65cedaba1f2f0c191205305bd0dad Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 6 Jul 2011 18:23:17 -0300 Subject: [PATCH] Notify the GAttrib instance if already connected 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 file changed, 4 insertions(+) diff --git a/src/device.c b/src/device.c index 2196cd4d2..b3c7384f4 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; @@ -2473,6 +2474,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; } -- 2.47.3