rymanluk commented on a change in pull request #599: nimble/ll: Fix crash when
scanning for AUX packets
URL: https://github.com/apache/mynewt-nimble/pull/599#discussion_r331675788
##########
File path: nimble/controller/src/ble_ll_scan.c
##########
@@ -182,6 +182,19 @@ static struct os_mempool ext_adv_pool;
static int ble_ll_scan_start(struct ble_ll_scan_sm *scansm,
struct ble_ll_sched_item *sch);
+static void
+ble_ll_aux_scan_drop(struct ble_ll_aux_data *aux_data)
+{
+ struct ble_ll_scan_sm *scansm = &g_ble_ll_scan_sm;
+
+ STATS_INC(ble_ll_stats, aux_scan_drop);
+
+ BLE_LL_ASSERT(aux_data);
+
+ ble_npl_event_set_arg(&scansm->aux_scan_drop_ev, aux_data);
Review comment:
Scheduling next chain happens in the LL so for sure dropping will happen
after previous chain is handled since it goes thru LL as well. Anyway there
can be 2 possibilities
1) previous chain has been sent with success to the host
2) previous chain has been sent as truncated
In both cases we should be fine thanks to ref counter and flags which keeps
information that truncated has been sent already to the host.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services