OSDN Git Service

Do not return failure if scan results is empty
authorNingyuan Wang <nywang@google.com>
Thu, 2 Mar 2017 20:18:29 +0000 (12:18 -0800)
committerNingyuan Wang <nywang@google.com>
Thu, 2 Mar 2017 20:19:27 +0000 (12:19 -0800)
It may happen if there is no AP in the environment.
In this case we only need to log instead of returning
error.

Bug: None
Test: compile, unit tests
Change-Id: I4187cc421db11c6fcc7e27e263865706cfb61abc

scanning/scan_utils.cpp

index 5105b6b..ffedcc7 100644 (file)
@@ -88,7 +88,7 @@ bool ScanUtils::GetScanResult(uint32_t interface_index,
   }
   if (response.empty()) {
     LOG(INFO) << "Unexpected empty scan result!";
-    return false;
+    return true;
   }
 
   for (auto& packet : response) {