mirror of
https://github.com/espressif/esp-idf.git
synced 2026-07-23 03:13:01 +03:00
Merge branch 'fix/ble_mesh_friend_send_seg_msg_failed_v5.5' into 'release/v5.5'
fix(ble_mesh): fix Friend queue losing segmented messages for LPN (5.5) See merge request espressif/esp-idf!47935
This commit is contained in:
@@ -1270,12 +1270,11 @@ static void enqueue_friend_pdu(struct bt_mesh_friend *frnd,
|
||||
net_buf_slist_put(&seg->queue, buf);
|
||||
|
||||
if (type == BLE_MESH_FRIEND_PDU_COMPLETE) {
|
||||
struct net_buf *sbuf;
|
||||
while ((sbuf = (void *)sys_slist_get(&seg->queue))) {
|
||||
sbuf->frags = NULL;
|
||||
sbuf->flags &= ~NET_BUF_FRAGS;
|
||||
}
|
||||
|
||||
/* First merge segments into the main queue (preserves the slist chain),
|
||||
* then clear frags/flags. Note: net_buf.frags and net_buf.node.next
|
||||
* share the same memory (union), so clearing frags before merge would
|
||||
* break the slist chain.
|
||||
*/
|
||||
sys_slist_merge_slist(&frnd->queue, &seg->queue);
|
||||
|
||||
frnd->queue_size += seg->seg_count;
|
||||
|
||||
Reference in New Issue
Block a user