diff --git a/CHANGELOG.md b/CHANGELOG.md index 0caaf76b1..188a939a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/hci.c b/src/hci.c index 54ad1034d..f4803bdc2 100644 --- a/src/hci.c +++ b/src/hci.c @@ -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);