This enables advertising on gatt server after gatt server
is connecteed with the remote gatt client. Advertisement slot
is allocated from slot-1 when multi advertisement is supported.
Change-Id: Ie6a6aee5cb21d6abfe56cfb5049428a29cf06d79
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
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));
/* allocate adv slot for gatt server if not assigned */
if (server_register_info->adv_slot_id < 0 ) {
- adv_slot_id = _bt_hal_get_available_adv_slot_id(&server_register_info->app_uuid, FALSE);
+ adv_slot_id = _bt_hal_get_available_adv_slot_id(&server_register_info->app_uuid, TRUE);
if (adv_slot_id < 0) {
ERR("failed to get the adv_slot");
return -1;