nimble/ll: Fix not clearing scan rsp on scan duration timeout

If timeout fired when we were waiting for scan response,
scan_rsp_pending would be left set and this would trigger assert
when starting next scan.
This commit is contained in:
Szymon Janc
2019-11-20 11:11:03 +01:00
parent bde7f5e884
commit 7a6929564d
+6
View File
@@ -1269,6 +1269,12 @@ ble_ll_scan_sm_stop(int chk_disable)
scansm->ext_scanning = 0;
}
#endif
/* Update backoff if we failed to receive scan response */
if (scansm->scan_rsp_pending) {
scansm->scan_rsp_pending = 0;
ble_ll_scan_req_backoff(scansm, 0);
}
OS_EXIT_CRITICAL(sr);
/* Count # of times stopped */