component/bt: Change the return position in the btc_gatts_inter_cb function.
This commit is contained in:
parent
00bcee2df2
commit
6ffa30a408
|
@ -414,17 +414,15 @@ static esp_gatt_status_t btc_gatts_check_valid_attr_tab(esp_gatts_attr_db_t *gat
|
||||||
uint16_t uuid = 0;
|
uint16_t uuid = 0;
|
||||||
|
|
||||||
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]);
|
|
||||||
} else {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uuid = (gatts_attr_db[i].att_desc.uuid_p[1] << 8) + (gatts_attr_db[i].att_desc.uuid_p[0]);
|
||||||
switch(uuid) {
|
switch(uuid) {
|
||||||
case ESP_GATT_UUID_PRI_SERVICE:
|
case ESP_GATT_UUID_PRI_SERVICE:
|
||||||
case ESP_GATT_UUID_SEC_SERVICE:
|
case ESP_GATT_UUID_SEC_SERVICE:
|
||||||
++svc_num;
|
if (++svc_num > 1) {
|
||||||
if (svc_num > 1) {
|
|
||||||
LOG_ERROR("Each service table can only created one primary service or secondly service.");
|
LOG_ERROR("Each service table can only created one primary service or secondly service.");
|
||||||
return ESP_GATT_ERROR;
|
return ESP_GATT_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -571,11 +569,10 @@ static void btc_gatts_inter_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
future_ready(btc_creat_tab_env.complete_future, FUTURE_SUCCESS);
|
future_ready(btc_creat_tab_env.complete_future, FUTURE_SUCCESS);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
status = btc_transfer_context(&msg, p_data,
|
status = btc_transfer_context(&msg, p_data,
|
||||||
sizeof(tBTA_GATTS), btc_gatts_cb_param_copy_req);
|
sizeof(tBTA_GATTS), btc_gatts_cb_param_copy_req);
|
||||||
|
|
Loading…
Reference in a new issue