Diff between a293f0e8f450c6247864b2a59f30ab7861f00544 and d090b7b8e539afa9c268a83259e7cfcb5b5b72a0

Changed Files

File Additions Deletions Status
android/hal-bluetooth.c +9 -1 modified

Full Patch

diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index 18e805b..b8ffce6 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -300,9 +300,17 @@ static void handle_acl_state_changed(void *buf, uint16_t len)
 
 static void handle_dut_mode_receive(void *buf, uint16_t len)
 {
+	struct hal_ev_dut_mode_receive *ev = buf;
+
 	DBG("");
 
-	/* TODO */
+	if (len != sizeof(*ev) + ev->len) {
+		error("invalid dut mode receive event (%u), aborting", len);
+		exit(EXIT_FAILURE);
+	}
+
+	if (bt_hal_cbacks->dut_mode_recv_cb)
+		bt_hal_cbacks->dut_mode_recv_cb(ev->opcode, ev->data, ev->len);
 }
 
 /* handlers will be called from notification thread context,