mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-25 18:35:17 +00:00
hci: fix bug in gap_inquiry_stop that triggered additional GAP_EVENT_INQUIRY_COMPLETE instead of stopping the inquiry
This commit is contained in:
parent
d32b5a2f58
commit
2c12328286
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- SDP Server: queue incoming connections when already connected instead of rejecting them
|
||||
|
||||
### Fixed
|
||||
- HCI: fix bug in gap_inquiry_stop that triggered additional GAP_EVENT_INQUIRY_COMPLETE instead of stopping the inquiry
|
||||
- L2CAP: fix issue with outgoing connection before read remote supported complete when other channels exist
|
||||
- L2CAP ERTM: allow SDU of szie MPS in first packet that contains L2CAP SDU Length
|
||||
- L2CAP ERTM: fix memory corruption triggered if local_mtu > mps
|
||||
|
@ -4599,7 +4599,7 @@ int gap_inquiry_start(uint8_t duration_in_1280ms_units){
|
||||
* @returns 0 if ok
|
||||
*/
|
||||
int gap_inquiry_stop(void){
|
||||
if (hci_stack->inquiry_state >= GAP_INQUIRY_DURATION_MIN || hci_stack->inquiry_state <= GAP_INQUIRY_DURATION_MAX) {
|
||||
if (hci_stack->inquiry_state >= GAP_INQUIRY_DURATION_MIN && hci_stack->inquiry_state <= GAP_INQUIRY_DURATION_MAX) {
|
||||
// emit inquiry complete event, before it even started
|
||||
uint8_t event[] = { GAP_EVENT_INQUIRY_COMPLETE, 1, 0};
|
||||
hci_emit_event(event, sizeof(event), 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user