diff --git a/components/bt/bluedroid/api/include/esp_gatts_api.h b/components/bt/bluedroid/api/include/esp_gatts_api.h index dde024aa9..bc97b76e4 100644 --- a/components/bt/bluedroid/api/include/esp_gatts_api.h +++ b/components/bt/bluedroid/api/include/esp_gatts_api.h @@ -162,7 +162,7 @@ typedef union { esp_gatt_status_t status; /*!< Operation status */ uint16_t attr_handle; /*!< Descriptor attribute handle */ uint16_t service_handle; /*!< Service attribute handle */ - esp_bt_uuid_t char_uuid; /*!< Characteristic uuid */ + esp_bt_uuid_t descr_uuid; /*!< Characteristic descriptor uuid */ } add_char_descr; /*!< Gatt server callback param of ESP_GATTS_ADD_CHAR_DESCR_EVT */ /** diff --git a/components/bt/bluedroid/bta/gatt/bta_gatts_act.c b/components/bt/bluedroid/bta/gatt/bta_gatts_act.c index 4c1380a3c..6bf6a8937 100644 --- a/components/bt/bluedroid/bta/gatt/bta_gatts_act.c +++ b/components/bt/bluedroid/bta/gatt/bta_gatts_act.c @@ -420,7 +420,7 @@ void bta_gatts_add_char(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA *p_msg) p_msg->api_add_char.perm, p_msg->api_add_char.property, p_attr_val, p_control); cb_data.add_result.server_if = p_rcb->gatt_if; - cb_data.add_result.service_id = p_msg->api_add_incl_srvc.hdr.layer_specific; + cb_data.add_result.service_id = p_msg->api_add_char.hdr.layer_specific; cb_data.add_result.attr_id = attr_id; // btla-specific ++ memcpy(&cb_data.add_result.char_uuid, &p_msg->api_add_char.char_uuid, sizeof(tBT_UUID)); @@ -470,7 +470,7 @@ void bta_gatts_add_char_descr(tBTA_GATTS_SRVC_CB *p_srvc_cb, tBTA_GATTS_DATA *p_ p_control); cb_data.add_result.server_if = p_rcb->gatt_if; - cb_data.add_result.service_id = p_msg->api_add_incl_srvc.hdr.layer_specific; + cb_data.add_result.service_id = p_msg->api_add_char_descr.hdr.layer_specific; cb_data.add_result.attr_id = attr_id; // btla-specific ++ memcpy(&cb_data.add_result.char_uuid, &p_msg->api_add_char_descr.descr_uuid, sizeof(tBT_UUID)); diff --git a/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c b/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c index c9d759e2c..ca1121382 100644 --- a/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c +++ b/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c @@ -832,7 +832,7 @@ void btc_gatts_cb_handler(btc_msg_t *msg) param.add_char_descr.status = p_data->add_result.status; param.add_char_descr.attr_handle = p_data->add_result.attr_id; param.add_char_descr.service_handle = p_data->add_result.service_id; - bta_to_btc_uuid(¶m.add_char_descr.char_uuid, &p_data->add_result.char_uuid); + bta_to_btc_uuid(¶m.add_char_descr.descr_uuid, &p_data->add_result.char_uuid); btc_gatts_cb_to_app(ESP_GATTS_ADD_CHAR_DESCR_EVT, gatts_if, ¶m); break;