From 041b66c55d6f0c2ba1f0f6d79cb87bf4faf6349c Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 2 Apr 2024 11:20:43 +0200 Subject: [PATCH] example/gatt_device_information_query: use address type from advertisement --- example/gatt_device_information_query.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/gatt_device_information_query.c b/example/gatt_device_information_query.c index 4a2a02e50..4b8f4d7cf 100644 --- a/example/gatt_device_information_query.c +++ b/example/gatt_device_information_query.c @@ -171,7 +171,6 @@ static void hci_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *p UNUSED(size); uint8_t status; - bd_addr_t address; if (packet_type != HCI_EVENT_PACKET){ return; @@ -196,8 +195,9 @@ static void hci_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *p case GAP_EVENT_ADVERTISING_REPORT: if (app_state != APP_STATE_W4_SCAN_RESULT) return; - gap_event_advertising_report_get_address(packet, address); - if (blacklist_contains(address)) { + gap_event_advertising_report_get_address(packet, report.address); + report.address_type = gap_event_advertising_report_get_address_type(packet); + if (blacklist_contains(report.address)) { break; } dump_advertising_report(packet);