Enable advertising after gatt server is connected
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-adapter-le.c
index ba84848..b1b4b1a 100644 (file)
@@ -365,9 +365,9 @@ int _bt_hal_get_available_adv_slot_id(bt_uuid_t *uuid, gboolean use_reserved_slo
        else if (use_reserved_slot == TRUE)
                i = 1;
        else
-               i = 2;
+               i = 0;
 
-       for (i = 0; i < le_feature_info.adv_inst_max; i++) {
+       for ( ; i < le_feature_info.adv_inst_max; i++) {
                if (le_adv_slot[i].initialized == 0) {
                        DBG("Slot to be allocated [%d] UUID to be registered [%s]",
                                i, btuuid2str(uuid->uu));