Skip to content
Commit cf953de4 authored by Pavel Vasilyev's avatar Pavel Vasilyev Committed by Fabio Baltieri
Browse files

Bluetooth: Mesh: Check pending_buf in bt_mesh_send_cb in friend.c



When friend entry is cleared by `friend_clear` after an adv buffer has
been sent to that friend in `friend_timeout`, another friend request
coming after this may reuse the same entry. It is possible that
`friend_timeout` will be scheduled twice: once by the friend request
and once by `buf_send_end` of the previously sent buffer.
In that case, the code will assert on line friend.c:1234. It is not
possible to cancel an adv buffer for the friendship that is to be
cleared, therefore, we need to ensure in correctness of the pending_buf
value in start and end callbacks.

Signed-off-by: default avatarPavel Vasilyev <pavel.vasilyev@nordicsemi.no>
parent fcbe88d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment