Bluetooth: Mesh: Fixes seg_tx_reset adv buf unref

In seg_tx_reset() in transport.c, set the busy flag to 0U
before doing adv buf unref, which will avoid sending
unnecessary adv packets in case the adv buf is already put
in the mesh adv_queue.

Fixes #20970

Signed-off-by: Maximus Liu <maximus.liu@gmail.com>
This commit is contained in:
Maximus Liu 2019-11-27 10:20:35 +08:00 committed by Johan Hedberg
commit 1050ef7932

View file

@ -204,6 +204,7 @@ static void seg_tx_reset(struct seg_tx *tx)
continue;
}
BT_MESH_ADV(tx->seg[i])->busy = 0U;
net_buf_unref(tx->seg[i]);
tx->seg[i] = NULL;
}