[PATCHv2 04/16] android/tester: Make GATT tests use generic pdu struct

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

 



---
 android/tester-gatt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/android/tester-gatt.c b/android/tester-gatt.c
index ccc8e24..73ef168 100644
--- a/android/tester-gatt.c
+++ b/android/tester-gatt.c
@@ -146,8 +146,8 @@ static struct gatt_search_service_data search_services_1 = {
 	.filter_uuid = NULL,
 };
 
-static const uint8_t exchange_mtu_req_pdu[] = { 0x02, 0xa0, 0x02 };
-static const uint8_t exchange_mtu_resp_pdu[] = { 0x03, 0xa0, 0x02 };
+static const struct pdu exchange_mtu_req_pdu = raw_pdu(0x02, 0xa0, 0x02);
+static const struct pdu exchange_mtu_resp_pdu = raw_pdu(0x03, 0xa0, 0x02);
 
 static struct bt_action_data bearer_type = {
 	.bearer_type = BDADDR_LE_PUBLIC,
@@ -833,10 +833,10 @@ static void gatt_cid_hook_cb(const void *data, uint16_t len, void *user_data)
 	case L2CAP_ATT_EXCHANGE_MTU_REQ:
 		tester_print("Exchange MTU request received.");
 
-		if (!memcmp(exchange_mtu_req_pdu, pdu, len))
+		if (!memcmp(exchange_mtu_req_pdu.data, pdu, len))
 			bthost_send_cid(bthost, cid_data->handle, cid_data->cid,
-						exchange_mtu_resp_pdu,
-						sizeof(exchange_mtu_resp_pdu));
+						exchange_mtu_resp_pdu.data,
+						exchange_mtu_resp_pdu.size);
 
 		break;
 	case L2CAP_ATT_EXCHANGE_MTU_RSP:
-- 
1.9.1

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