OSDN Git Service

[DO NOT MERGE] Remove incorrect assert in btm_read_rssi_cb
authorAndre Eisenbach <eisenbach@google.com>
Thu, 3 Nov 2016 21:53:49 +0000 (14:53 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Thu, 3 Nov 2016 22:40:56 +0000 (22:40 +0000)
|data| may be NULL if the RSSI request times out.
See btm_read_rssi_timeout implementation for details.

Bug: 32587130
Test: manual
Change-Id: Ide9dee819e1db24a39c05b086cd4c0b558ca23ef

btif/src/btif_media_task.c

index 262bc53..ef3d4fb 100644 (file)
@@ -494,7 +494,11 @@ UNUSED_ATTR static const char *dump_media_event(UINT16 event)
 
 static void btm_read_rssi_cb(void *data)
 {
-    assert(data);
+    if (data == NULL)
+    {
+        LOG_ERROR(LOG_TAG, "%s RSSI request timed out", __func__);
+        return;
+    }
 
     tBTM_RSSI_RESULTS *result = (tBTM_RSSI_RESULTS*)data;
     if (result->status != BTM_SUCCESS)