@@ -1983,6 +1983,7 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
1983
1983
arg -> model_publish .device_role );
1984
1984
if (err ) {
1985
1985
BT_ERR ("Failed to set client role" );
1986
+ btc_ble_mesh_model_publish_comp_cb (arg -> model_publish .model , err );
1986
1987
break ;
1987
1988
}
1988
1989
}
@@ -1995,10 +1996,14 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
1995
1996
struct net_buf_simple * buf = bt_mesh_alloc_buf (arg -> model_send .length + BLE_MESH_MIC_SHORT );
1996
1997
if (!buf ) {
1997
1998
BT_ERR ("%s, Out of memory" , __func__ );
1999
+ btc_ble_mesh_model_send_comp_cb (arg -> model_send .model , arg -> model_send .ctx ,
2000
+ arg -> model_send .opcode , - ENOMEM );
1998
2001
break ;
1999
2002
}
2003
+
2000
2004
net_buf_simple_add_mem (buf , arg -> model_send .data , arg -> model_send .length );
2001
2005
arg -> model_send .ctx -> srv_send = true;
2006
+
2002
2007
err = bt_mesh_model_send ((struct bt_mesh_model * )arg -> model_send .model ,
2003
2008
(struct bt_mesh_msg_ctx * )arg -> model_send .ctx ,
2004
2009
buf , NULL , NULL );
@@ -2012,8 +2017,11 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
2012
2017
struct net_buf_simple * buf = bt_mesh_alloc_buf (arg -> model_send .length + BLE_MESH_MIC_SHORT );
2013
2018
if (!buf ) {
2014
2019
BT_ERR ("%s, Out of memory" , __func__ );
2020
+ btc_ble_mesh_model_send_comp_cb (arg -> model_send .model , arg -> model_send .ctx ,
2021
+ arg -> model_send .opcode , - ENOMEM );
2015
2022
break ;
2016
2023
}
2024
+
2017
2025
net_buf_simple_add_mem (buf , arg -> model_send .data , arg -> model_send .length );
2018
2026
bt_mesh_client_common_param_t param = {
2019
2027
.opcode = arg -> model_send .opcode ,
0 commit comments