kopia lustrzana https://github.com/espressif/esp-idf
ble_mesh: stack: Fix no events for some error conditions
rodzic
5f6f61f634
commit
02eaaca3d6
|
@ -1983,6 +1983,7 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
|
||||||
arg->model_publish.device_role);
|
arg->model_publish.device_role);
|
||||||
if (err) {
|
if (err) {
|
||||||
BT_ERR("Failed to set client role");
|
BT_ERR("Failed to set client role");
|
||||||
|
btc_ble_mesh_model_publish_comp_cb(arg->model_publish.model, err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1995,10 +1996,14 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
|
||||||
struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + BLE_MESH_MIC_SHORT);
|
struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + BLE_MESH_MIC_SHORT);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
BT_ERR("%s, Out of memory", __func__);
|
BT_ERR("%s, Out of memory", __func__);
|
||||||
|
btc_ble_mesh_model_send_comp_cb(arg->model_send.model, arg->model_send.ctx,
|
||||||
|
arg->model_send.opcode, -ENOMEM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
net_buf_simple_add_mem(buf, arg->model_send.data, arg->model_send.length);
|
net_buf_simple_add_mem(buf, arg->model_send.data, arg->model_send.length);
|
||||||
arg->model_send.ctx->srv_send = true;
|
arg->model_send.ctx->srv_send = true;
|
||||||
|
|
||||||
err = bt_mesh_model_send((struct bt_mesh_model *)arg->model_send.model,
|
err = bt_mesh_model_send((struct bt_mesh_model *)arg->model_send.model,
|
||||||
(struct bt_mesh_msg_ctx *)arg->model_send.ctx,
|
(struct bt_mesh_msg_ctx *)arg->model_send.ctx,
|
||||||
buf, NULL, NULL);
|
buf, NULL, NULL);
|
||||||
|
@ -2012,8 +2017,11 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
|
||||||
struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + BLE_MESH_MIC_SHORT);
|
struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + BLE_MESH_MIC_SHORT);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
BT_ERR("%s, Out of memory", __func__);
|
BT_ERR("%s, Out of memory", __func__);
|
||||||
|
btc_ble_mesh_model_send_comp_cb(arg->model_send.model, arg->model_send.ctx,
|
||||||
|
arg->model_send.opcode, -ENOMEM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
net_buf_simple_add_mem(buf, arg->model_send.data, arg->model_send.length);
|
net_buf_simple_add_mem(buf, arg->model_send.data, arg->model_send.length);
|
||||||
bt_mesh_client_common_param_t param = {
|
bt_mesh_client_common_param_t param = {
|
||||||
.opcode = arg->model_send.opcode,
|
.opcode = arg->model_send.opcode,
|
||||||
|
|
Ładowanie…
Reference in New Issue