Merge branch 'bugfix/ble_mesh_proxy_client_net_resend_v4.1' into 'release/v4.1'

ble_mesh: stack: Fix proxy client may fail to resend msg (v4.1)

See merge request espressif/esp-idf!12322
This commit is contained in:
Island 2021-02-07 16:38:36 +08:00
commit 47d859b2a4
2 changed files with 7 additions and 1 deletions

View File

@ -543,7 +543,7 @@ static void ble_mesh_relay_task_post(bt_mesh_msg_t *msg, uint32_t timeout)
BT_INFO("Full queue, remove the oldest relay packet");
/* Remove the oldest relay packet from queue */
if (xQueueReceive(relay_queue.handle, &old_msg, K_NO_WAIT) != pdTRUE) {
BT_ERR("Failed to remove item from queue");
BT_ERR("Failed to remove item from relay queue");
bt_mesh_unref_buf(msg);
return;
}

View File

@ -828,6 +828,12 @@ int bt_mesh_net_resend(struct bt_mesh_subnet *sub, struct net_buf *buf,
return 0;
}
if (IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_CLIENT) &&
bt_mesh_proxy_client_relay(&buf->b, dst)) {
send_cb_finalize(cb, cb_data);
return 0;
}
bt_mesh_adv_send(buf, cb, cb_data);
return 0;
}