You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2019/07/12 13:46:43 UTC
[mynewt-nimble] 06/12: nimble/ll: Add missing aux_data check
This is an automated email from the ASF dual-hosted git repository.
rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 03a628808378900e188d5aee06bf17af6eb175c5
Author: Ćukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Thu Jul 11 10:03:43 2019 +0200
nimble/ll: Add missing aux_data check
---
nimble/controller/src/ble_ll_scan.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index 7e19143..9e755cc 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -2635,11 +2635,13 @@ ble_ll_hci_send_ext_adv_report(uint8_t ptype, uint8_t *adva, uint8_t adva_type,
evt->evt_type |= (BLE_HCI_ADV_DATA_STATUS_INCOMPLETE);
} else {
evt->evt_type |= (BLE_HCI_ADV_DATA_STATUS_TRUNCATED);
- BLE_LL_AUX_SET_FLAG(aux_data, BLE_LL_AUX_TRUNCATED_SENT);
rc = -1;
- if (!BLE_LL_AUX_CHECK_FLAG(aux_data, BLE_LL_SENT_EVENT_TO_HOST)) {
- ble_hci_trans_buf_free((uint8_t *)evt);
- goto done;
+ if (aux_data) {
+ BLE_LL_AUX_SET_FLAG(aux_data, BLE_LL_AUX_TRUNCATED_SENT);
+ if (!BLE_LL_AUX_CHECK_FLAG(aux_data, BLE_LL_SENT_EVENT_TO_HOST)) {
+ ble_hci_trans_buf_free((uint8_t *)evt);
+ goto done;
+ }
}
}