OSDN Git Service

Fix discovery status handling
authorJakub Pawlowski <jpawlowski@google.com>
Fri, 12 Feb 2016 18:35:01 +0000 (10:35 -0800)
committerAndre Eisenbach <eisenbach@google.com>
Thu, 18 Feb 2016 18:39:26 +0000 (10:39 -0800)
This typo was introduced in commit 48db2d25 3years ago.
This cause unnecesary purge of cache and rediscovery even though
discovery was successfull.

Change-Id: I828e148ad489af1e231d33d7807bbe0e46f445c5

bta/gatt/bta_gattc_cache.c

index a27bf0c..71625d5 100644 (file)
@@ -956,7 +956,7 @@ void bta_gattc_disc_cmpl_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type, tGATT
 
     if ( p_clcb && (status != GATT_SUCCESS || p_clcb->status != GATT_SUCCESS) )
     {
-        if (p_clcb->status == GATT_SUCCESS)
+        if (status == GATT_SUCCESS)
             p_clcb->status = status;
         bta_gattc_sm_execute(p_clcb, BTA_GATTC_DISCOVER_CMPL_EVT, NULL);
         return;