GATT: gatt_write_ccc_rsp with error (0x0e) removes always beginning from subscriptions head #21375
Labels
area: Bluetooth
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Describe the bug
In a multicentral application when
gatt_write_ccc_rsp
is called with error "0x0e", thesubscriptions
always get removed beginning from the head, since in the call ofgatt_subscription_remove
tmp
is provided as the second parameter instead ofprev
.To Reproduce
Not sure, what error "0x0e" is actually.
I'm testing around with many (20+) connections from one central with one subscription to each peripheral device. I guess it hapens, on enabling the notifications to the last connected device (or during connection.
To see the issue, i added a counter to
bt_gatt_notification
to see, how many elements are present insubscriptions.
(see log output below,bt_gatt.bt_gatt_notification: handle 0x000d length 15 it 44
--> 44 subscriptions; later on only 1 subscription).Expected behavior
Only the subscription of the disconnected device is removed.
Impact
No notifications passed to devices connected before this happens.
Screenshots or console output
Environment (please complete the following information):
Additional context
I'll provide a pull-request for this soon.
The text was updated successfully, but these errors were encountered: