mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
component/bt: fix bug where uuid was not reset in btc_gatts_act_create_attr_tab.
Merges #307 https://github.com/espressif/esp-idf/pull/307
This commit is contained in:
committed by
Angus Gratton
parent
a286846095
commit
6bb1367fe5
@@ -182,13 +182,16 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
|
|||||||
future_t *future_p;
|
future_t *future_p;
|
||||||
esp_ble_gatts_cb_param_t param;
|
esp_ble_gatts_cb_param_t param;
|
||||||
|
|
||||||
//set the attribute table create service flag to ture
|
//set the attribute table create service flag to true
|
||||||
btc_creat_tab_env.is_tab_creat_svc = true;
|
btc_creat_tab_env.is_tab_creat_svc = true;
|
||||||
btc_creat_tab_env.num_handle = max_nb_attr;
|
btc_creat_tab_env.num_handle = max_nb_attr;
|
||||||
for(int i = 0; i < max_nb_attr; i++){
|
for(int i = 0; i < max_nb_attr; i++){
|
||||||
if(gatts_attr_db[i].att_desc.uuid_length== ESP_UUID_LEN_16){
|
if(gatts_attr_db[i].att_desc.uuid_length== ESP_UUID_LEN_16){
|
||||||
uuid = (gatts_attr_db[i].att_desc.uuid_p[1] << 8) + (gatts_attr_db[i].att_desc.uuid_p[0]);
|
uuid = (gatts_attr_db[i].att_desc.uuid_p[1] << 8) + (gatts_attr_db[i].att_desc.uuid_p[0]);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
future_p = future_new();
|
future_p = future_new();
|
||||||
if (future_p == NULL) {
|
if (future_p == NULL) {
|
||||||
LOG_ERROR("%s failed:no mem\n", __func__);
|
LOG_ERROR("%s failed:no mem\n", __func__);
|
||||||
|
Reference in New Issue
Block a user