Bluetooth: Mesh: Fix unable sent mesh message

When proxy advertising enabled, but at same time, the
connection event report, will cause `ADV_FLAG_PROXY` not
set, so cb `connected` will not be process, cause mesh message
unable to sent.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/58721

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2023-06-01 14:38:56 +08:00 committed by Anas Nashif
commit 5f9ac54e2f

View file

@ -307,8 +307,10 @@ static void send_pending_adv(struct k_work *work)
return;
}
if (!bt_mesh_adv_gatt_send()) {
atomic_set_bit(adv->flags, ADV_FLAG_PROXY);
atomic_set_bit(adv->flags, ADV_FLAG_PROXY);
if (bt_mesh_adv_gatt_send()) {
atomic_clear_bit(adv->flags, ADV_FLAG_PROXY);
}
if (atomic_test_and_clear_bit(adv->flags, ADV_FLAG_SCHEDULE_PENDING)) {