]> granicus.if.org Git - esp-idf/commitdiff
component/bt: fix bug where uuid was not reset in btc_gatts_act_create_attr_tab.
authorDerek Gregory <derekmgregory@gmail.com>
Sat, 28 Jan 2017 08:47:09 +0000 (00:47 -0800)
committerAngus Gratton <angus@espressif.com>
Fri, 3 Mar 2017 03:59:15 +0000 (14:59 +1100)
Merges #307 https://github.com/espressif/esp-idf/pull/307

components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c

index 2ba3ec0f143b58cc19d110feb60a61a97dfcef32..da8d4d5f68e5920157fdc7d85910e419ce1a74d5 100644 (file)
@@ -182,13 +182,16 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
     future_t *future_p;
     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.num_handle = max_nb_attr;
     for(int i = 0; i < max_nb_attr; i++){
         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;
+        }
         future_p = future_new();
         if (future_p == NULL) {
                 LOG_ERROR("%s failed:no mem\n", __func__);