Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

l2cap: adjust the order of the code #590

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2610,10 +2610,10 @@ static void l2cap_handle_connection_failed_for_addr(bd_addr_t address, uint8_t s
if (!l2cap_is_dynamic_channel_type(channel->channel_type)) continue;
if (channel->state == L2CAP_STATE_EMIT_OPEN_FAILED_AND_DISCARD){
done = 0;
// failure, forward error code
l2cap_handle_channel_open_failed(channel, status);
// discard channel
btstack_linked_list_remove(&l2cap_channels, (btstack_linked_item_t *) channel);
// failure, forward error code
l2cap_handle_channel_open_failed(channel, status);
l2cap_free_channel_entry(channel);
break;
}
Expand Down