Merge branch 'bugfix/btdm_add_char_descr_uuid_error' into 'master'

component/bt: Change the char_uuid to descr_uuid in the add descriptor callback params.

See merge request idf/esp-idf!2065
This commit is contained in:
Jiang Jiang Jian 2018-03-20 18:43:42 +08:00
commit 0f6f762be0
3 changed files with 4 additions and 4 deletions

View file

@ -162,7 +162,7 @@ typedef union {
esp_gatt_status_t status; /*!< Operation status */ esp_gatt_status_t status; /*!< Operation status */
uint16_t attr_handle; /*!< Descriptor attribute handle */ uint16_t attr_handle; /*!< Descriptor attribute handle */
uint16_t service_handle; /*!< Service 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 */ } add_char_descr; /*!< Gatt server callback param of ESP_GATTS_ADD_CHAR_DESCR_EVT */
/** /**

View file

@ -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.perm,
p_msg->api_add_char.property, p_attr_val, p_control); 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.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; cb_data.add_result.attr_id = attr_id;
// btla-specific ++ // btla-specific ++
memcpy(&cb_data.add_result.char_uuid, &p_msg->api_add_char.char_uuid, sizeof(tBT_UUID)); 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); p_control);
cb_data.add_result.server_if = p_rcb->gatt_if; 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; cb_data.add_result.attr_id = attr_id;
// btla-specific ++ // btla-specific ++
memcpy(&cb_data.add_result.char_uuid, &p_msg->api_add_char_descr.descr_uuid, sizeof(tBT_UUID)); memcpy(&cb_data.add_result.char_uuid, &p_msg->api_add_char_descr.descr_uuid, sizeof(tBT_UUID));

View file

@ -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.status = p_data->add_result.status;
param.add_char_descr.attr_handle = p_data->add_result.attr_id; param.add_char_descr.attr_handle = p_data->add_result.attr_id;
param.add_char_descr.service_handle = p_data->add_result.service_id; param.add_char_descr.service_handle = p_data->add_result.service_id;
bta_to_btc_uuid(&param.add_char_descr.char_uuid, &p_data->add_result.char_uuid); bta_to_btc_uuid(&param.add_char_descr.descr_uuid, &p_data->add_result.char_uuid);
btc_gatts_cb_to_app(ESP_GATTS_ADD_CHAR_DESCR_EVT, gatts_if, &param); btc_gatts_cb_to_app(ESP_GATTS_ADD_CHAR_DESCR_EVT, gatts_if, &param);
break; break;