[RFC 5/6] android/hal: Add debug prints for every HAL callback

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

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

This allows us to trace callbacks to Java.
---
 android/hal-bluetooth.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index 91c5f97..7334d24 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -153,6 +153,8 @@ static void handle_adapter_props_changed(void *buf, uint16_t len)
 	struct hal_ev_adapter_props_changed *ev = buf;
 	bt_property_t props[ev->num_props];
 
+	DBG("");
+
 	if (!bt_hal_cbacks->adapter_properties_cb)
 		return;
 
@@ -168,6 +170,8 @@ static void handle_bond_state_change(void *buf)
 	struct hal_ev_bond_state_changed *ev = buf;
 	bt_bdaddr_t *addr = (bt_bdaddr_t *) ev->bdaddr;
 
+	DBG("state %u", ev->state);
+
 	if (bt_hal_cbacks->bond_state_changed_cb)
 		bt_hal_cbacks->bond_state_changed_cb(ev->status, addr,
 								ev->state);
@@ -180,6 +184,8 @@ static void handle_pin_request(void *buf)
 	bt_bdaddr_t *addr = (bt_bdaddr_t *) ev->bdaddr;
 	bt_bdname_t *name = (bt_bdname_t *) ev->name;
 
+	DBG("");
+
 	if (bt_hal_cbacks->pin_request_cb)
 		bt_hal_cbacks->pin_request_cb(addr, name, ev->class_of_dev);
 }
@@ -191,6 +197,8 @@ static void handle_ssp_request(void *buf)
 	bt_bdaddr_t *addr = (bt_bdaddr_t *) ev->bdaddr;
 	bt_bdname_t *name = (bt_bdname_t *) ev->name;
 
+	DBG("");
+
 	if (bt_hal_cbacks->ssp_request_cb)
 		bt_hal_cbacks->ssp_request_cb(addr, name, ev->class_of_dev,
 							ev->pairing_variant,
@@ -218,6 +226,8 @@ static void handle_discovery_state_changed(void *buf)
 {
 	struct hal_ev_discovery_state_changed *ev = buf;
 
+	DBG("");
+
 	if (bt_hal_cbacks->discovery_state_changed_cb)
 		bt_hal_cbacks->discovery_state_changed_cb(ev->state);
 }
@@ -227,6 +237,8 @@ static void handle_device_found(void *buf, uint16_t len)
 	struct hal_ev_device_found *ev = buf;
 	bt_property_t props[ev->num_props];
 
+	DBG("");
+
 	if (!bt_hal_cbacks->device_found_cb)
 		return;
 
@@ -242,6 +254,8 @@ static void handle_device_state_changed(void *buf, uint16_t len)
 	struct hal_ev_remote_device_props *ev = buf;
 	bt_property_t props[ev->num_props];
 
+	DBG("");
+
 	if (!bt_hal_cbacks->remote_device_properties_cb)
 		return;
 
-- 
1.7.10.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