[PATCH 4/5] attrib/gattrib: Fix gattrib send command

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

 



If client provides id to the g_attrib_send function it should be taken
into account and appropriate bt_att_send* should be called
---
 attrib/gattrib.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 3ce6748..cf0bf3b 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -276,8 +276,12 @@ guint g_attrib_send(GAttrib *attrib, guint id, const guint8 *pdu, guint16 len,
 		destroy_cb = attrib_callbacks_remove;
 	}
 
-	return bt_att_send(attrib->att, pdu[0], (void *)pdu + 1, len - 1,
-						response_cb, cb, destroy_cb);
+	if (id == 0)
+		return bt_att_send(attrib->att, pdu[0], (void *)pdu + 1,
+					len - 1, response_cb, cb, destroy_cb);
+
+	return bt_att_send_with_id(attrib->att, id, pdu[0], (void *)pdu + 1,
+					len - 1, response_cb, cb, destroy_cb);
 }
 
 gboolean g_attrib_cancel(GAttrib *attrib, guint id)
-- 
1.8.4

--
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