OSDN Git Service

Fix problem where multi-adv instances cannot be re-used
authorAndre Eisenbach <eisenbach@google.com>
Fri, 22 May 2015 23:38:54 +0000 (16:38 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 8 Jun 2015 09:51:08 +0000 (02:51 -0700)
After using all multi-adv instances and stopping them, the instance ID
for each instance is incorrectly reset, causing the instance to be not
usable anymore.

Bug: 21404808
Change-Id: Ie3a3f07bc2204c7268567cb56248cd3eb7751742

stack/btm/btm_ble_multi_adv.c

index dfd31e3..6ee3e94 100644 (file)
@@ -740,7 +740,7 @@ tBTM_STATUS BTM_BleDisableAdvInstance (UINT8 inst_id)
          {
             btm_ble_multi_adv_configure_rpa(&btm_multi_adv_cb.p_adv_inst[inst_id-1]);
             btu_stop_timer_oneshot(&btm_multi_adv_cb.p_adv_inst[inst_id-1].raddr_timer_ent);
-            btm_multi_adv_cb.p_adv_inst[inst_id-1].inst_id = 0;
+            btm_multi_adv_cb.p_adv_inst[inst_id-1].in_use = FALSE;
          }
      }
     return rt;