Bug 516302 - nsWifiMonitor::DoScan spins in a tight loop on error r=blassey a=jst
authorDoug Turner <dougt@dougt.org>
Wed, 15 Sep 2010 09:39:18 -0700
changeset 53970 c6ca517718944dd3f9ae812312b8655fbfeb956a
parent 53969 6e0a42c4af824e819ff33a914bbe59f8abf32fbc
child 53971 904b6d091d4e8c1b3cca3742e12cf14de5d8345d
push idunknown
push userunknown
push dateunknown
reviewersblassey, jst
bugs516302
milestone2.0b7pre
Bug 516302 - nsWifiMonitor::DoScan spins in a tight loop on error r=blassey a=jst
netwerk/wifi/nsWifiScannerMac.cpp
--- a/netwerk/wifi/nsWifiScannerMac.cpp
+++ b/netwerk/wifi/nsWifiScannerMac.cpp
@@ -172,21 +172,21 @@ nsWifiMonitor::DoScanOld()
 
     CFArrayRef managed_access_points = NULL;
     CFArrayRef adhoc_access_points = NULL;
 
     if ((*WirelessScanSplit_function_)(wifi_context_,
                                       &managed_access_points,
                                       &adhoc_access_points,
                                       0) != noErr) {
-      continue;
+      return NS_ERROR_FAILURE;
     }
 
     if (managed_access_points == NULL) {
-      continue;
+      return NS_ERROR_FAILURE;
     }
 
     int accessPointsCount = CFArrayGetCount(managed_access_points);
 
     for (int i = 0; i < accessPointsCount; ++i) {
 
       nsWifiAccessPoint* ap = new nsWifiAccessPoint();
       if (!ap)