OSDN Git Service

Don't stop sniff timer before checking for service ID entry
authorMallikarjuna GB <gbmalli@codeaurora.org>
Fri, 22 May 2015 09:44:25 +0000 (15:14 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 5 Jun 2015 01:09:26 +0000 (01:09 +0000)
- Avoid stopping sniff timer before checking for service
ID entry for which bta_sys_conn_close is called since if
entry is not present we return without re-starting timer
and ACL doesn't go into sniff.

Change-Id: I063da8e58e067ade5d646debf086bb443066106c

bta/dm/bta_dm_pm.c

index 42ed92f..43c9a5a 100644 (file)
@@ -179,7 +179,6 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
     if(i> p_bta_dm_pm_cfg[0].app_id)
         return;
 
-    bta_dm_pm_stop_timer(peer_addr);
     /*p_dev = bta_dm_find_peer_device(peer_addr);*/
 
 #if (BTM_SSR_INCLUDED == TRUE)
@@ -256,6 +255,9 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
         bta_dm_conn_srvcs.conn_srvc[j].state = status;
     }
 
+    /* stop timer */
+    bta_dm_pm_stop_timer(peer_addr);
+
     if(p_dev)
     {
         p_dev->pm_mode_attempted = 0;