diff mbox series

[BlueZ,3/4] device: Enable ATT layer debugging

Message ID 20210108211513.5180-3-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/4] util: Introduce util_debug_va | expand

Commit Message

Luiz Augusto von Dentz Jan. 8, 2021, 9:15 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This uses bt_att_set_debug to enable ATT debugging which is useful for
detecting error such as an ATT transaction timing out.
---
 src/device.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index 2e97876ec..fe885aa64 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5336,6 +5336,8 @@  bool device_attach_att(struct btd_device *dev, GIOChannel *io)
 
 	bt_att_ref(dev->att);
 
+	bt_att_set_debug(dev->att, BT_ATT_DEBUG, gatt_debug, NULL, NULL);
+
 	dev->att_disconn_id = bt_att_register_disconnect(dev->att,
 						att_disconnected_cb, dev, NULL);
 	bt_att_set_close_on_unref(dev->att, true);