mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-31 01:20:44 +00:00
bnep: emit channel opened with ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION if connection cannot be set up
This commit is contained in:
parent
6f4194f035
commit
cf25bba7d8
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user