From f75474f359367e315f65c31cfafba60178f344ed Mon Sep 17 00:00:00 2001 From: Wu Meng Shi Date: Sun, 8 Oct 2023 15:07:31 +0800 Subject: [PATCH] fix(ble_mesh): fix compilation failure on using scene model. --- .../bt/esp_ble_mesh/btc/btc_ble_mesh_time_scene_model.c | 8 ++++---- .../btc/include/btc_ble_mesh_time_scene_model.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/bt/esp_ble_mesh/btc/btc_ble_mesh_time_scene_model.c b/components/bt/esp_ble_mesh/btc/btc_ble_mesh_time_scene_model.c index dde61d4138..b6d71f8d7f 100644 --- a/components/bt/esp_ble_mesh/btc/btc_ble_mesh_time_scene_model.c +++ b/components/bt/esp_ble_mesh/btc/btc_ble_mesh_time_scene_model.c @@ -79,7 +79,7 @@ void btc_ble_mesh_time_scene_client_arg_deep_free(btc_msg_t *msg) { btc_ble_mesh_time_scene_client_args_t *arg = NULL; - if (!msg || !msg->arg) { + if (!msg) { BT_ERR("%s, Invalid parameter", __func__); return; } @@ -166,7 +166,7 @@ static void btc_ble_mesh_time_scene_client_free_req_data(btc_msg_t *msg) { esp_ble_mesh_time_scene_client_cb_param_t *arg = NULL; - if (!msg || !msg->arg) { + if (!msg) { BT_ERR("%s, Invalid parameter", __func__); return; } @@ -293,7 +293,7 @@ void btc_ble_mesh_time_scene_client_call_handler(btc_msg_t *msg) esp_ble_mesh_time_scene_client_cb_param_t cb = {0}; bt_mesh_client_common_param_t common = {0}; - if (!msg || !msg->arg) { + if (!msg) { BT_ERR("%s, Invalid parameter", __func__); return; } @@ -353,7 +353,7 @@ void btc_ble_mesh_time_scene_client_cb_handler(btc_msg_t *msg) { esp_ble_mesh_time_scene_client_cb_param_t *param = NULL; - if (!msg || !msg->arg) { + if (!msg) { BT_ERR("%s, Invalid parameter", __func__); return; } diff --git a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h index 6c878dc776..850a77493e 100644 --- a/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h +++ b/components/bt/esp_ble_mesh/btc/include/btc_ble_mesh_time_scene_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_time_scene_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_time_scene_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_time_scene_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_time_scene_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf);