diff --git a/CHANGELOG.md b/CHANGELOG.md index e7e7b05c6..c5dffdeca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - GAP: store link key for standard/non-SSP pairing +- BENP: emit channel opened with ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION if connection cannot be set up ### Changed - BTstack HID: remove HID_PROTOCOL_MODE_REPORT_WITH_FALLBACK_TO_BOOT diff --git a/src/classic/bnep.c b/src/classic/bnep.c index ae13b5476..f27e2462f 100644 --- a/src/classic/bnep.c +++ b/src/classic/bnep.c @@ -1352,7 +1352,12 @@ static int bnep_hci_event_handler(uint8_t *packet, uint16_t size) switch (channel->state) { case BNEP_CHANNEL_STATE_WAIT_FOR_CONNECTION_REQUEST: case BNEP_CHANNEL_STATE_WAIT_FOR_CONNECTION_RESPONSE: + // emit channel open failed + bnep_emit_open_channel_complete(channel, ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION, 0); + bnep_channel_finalize(channel); + return 1; case BNEP_CHANNEL_STATE_CONNECTED: + // emit channel closed bnep_channel_finalize(channel); return 1; default: