aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeng-hsuan Chung <menghsuan@google.com>2017-08-31 08:56:23 -0700
committerMeng-hsuan Chung <menghsuan@google.com>2017-08-31 11:46:53 -0700
commitdc8df2f81cdd3b11d6fec1d02ef9cb746deb2837 (patch)
tree3969b01f2339aa8069146e4f936b181082600ed2
parent81bb214b3c181ed4e4668593d4e0e03be587da3e (diff)
downloadchre-dc8df2f81cdd3b11d6fec1d02ef9cb746deb2837.tar.gz
Log error for invalid wifi scan response
Bug: 65225494 Test: run nanoapp and observe error message Change-Id: I1864745c97f6490204e55ffd456e05533d2ca141
-rw-r--r--core/wifi_request_manager.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/wifi_request_manager.cc b/core/wifi_request_manager.cc
index 83e45b48..14ab4693 100644
--- a/core/wifi_request_manager.cc
+++ b/core/wifi_request_manager.cc
@@ -422,8 +422,18 @@ void WifiRequestManager::handleScanResponseSync(bool pending,
LOGE("handleScanResponseSync called with no outstanding request");
}
+ // TODO: raise this to CHRE_ASSERT_LOG
+ if (!pending && errorCode == CHRE_ERROR_NONE) {
+ LOGE("Invalid wifi scan response");
+ errorCode = CHRE_ERROR;
+ }
+
if (mScanRequestingNanoappInstanceId.has_value()) {
bool success = (pending && errorCode == CHRE_ERROR_NONE);
+ if (!success) {
+ LOGW("Wifi scan request failed: pending %d, errorCode %" PRIu8,
+ pending, errorCode);
+ }
postScanRequestAsyncResultEventFatal(*mScanRequestingNanoappInstanceId,
success, errorCode,
mScanRequestingNanoappCookie);