ble_mesh: stack: Fix proxy client may fail to resend msg

This commit is contained in:
lly 2020-07-04 18:57:41 +08:00
parent 967c07b6ae
commit 370e65ec8a
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;
}