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

bluetooth: host: Connection not being unreferenced when using CCC match callback #20299

Closed
fnde-ot opened this issue Nov 4, 2019 · 0 comments
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug

Comments

@fnde-ot
Copy link
Collaborator

fnde-ot commented Nov 4, 2019

Describe the bug
When returning false from the CCC match callback the connection is not unreferenced, which leads to it not being cleaned up when disconnecting. It is due to missing bt_conn_unref.

To Reproduce
Register a CCC attribute with a match callback, and return false from it. When trying to send a notification and disconnecting, we can see the connection not being cleaned up.

Expected behavior
Connection should be unreferenced.

Impact
It will prevent the connection from being cleaned-up on disconnect and will eventually prevent new connections if it happens BT_MAX_CONN times.

@fnde-ot fnde-ot added the bug The issue is a bug, or the PR is fixing a bug label Nov 4, 2019
fnde-ot added a commit to fnde-ot/zephyr that referenced this issue Nov 4, 2019
Fix missing bt_conn_unref when using the ccc match callback.

Fixes: zephyrproject-rtos#20299

Signed-off-by: François Delawarde <fnde@oticon.com>
backporting bot pushed a commit that referenced this issue Nov 4, 2019
Fix missing bt_conn_unref when using the ccc match callback.

Fixes: #20299

Signed-off-by: François Delawarde <fnde@oticon.com>
nashif pushed a commit that referenced this issue Nov 7, 2019
Fix missing bt_conn_unref when using the ccc match callback.

Fixes: #20299

Signed-off-by: François Delawarde <fnde@oticon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants