Bug 866024 - nsWifiMonitorGonk reports correct list of access points.
authorNikhil Marathe <nsm.nikhil@gmail.com>
Mon, 29 Apr 2013 17:34:42 +0530
changeset 130199 9edc1d55aff547ddf47604dd7a76839616ccb7fb
parent 130198 082445b83eba1134f01a1e6d1110c68b41987a5b
child 130200 e58195e26c4f06adda5c717db4ca8597f96a6983
push idunknown
push userunknown
push dateunknown
bugs866024
milestone23.0a1
Bug 866024 - nsWifiMonitorGonk reports correct list of access points.
netwerk/wifi/nsWifiMonitorGonk.cpp
--- a/netwerk/wifi/nsWifiMonitorGonk.cpp
+++ b/netwerk/wifi/nsWifiMonitorGonk.cpp
@@ -149,19 +149,19 @@ nsWifiMonitor::Onready(uint32_t count, n
 
     accessPoints.AppendObject(ap);
   }
 
   bool accessPointsChanged = !AccessPointsEqual(accessPoints, mLastAccessPoints);
   ReplaceArray(mLastAccessPoints, accessPoints);
 
   nsTArray<nsIWifiAccessPoint*> ac;
-  uint32_t resultCount = accessPoints.Count();
+  uint32_t resultCount = mLastAccessPoints.Count();
   for (uint32_t i = 0; i < resultCount; i++) {
-    ac.AppendElement(accessPoints[i]);
+    ac.AppendElement(mLastAccessPoints[i]);
   }
 
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     if (!mListeners[i].mHasSentData || accessPointsChanged) {
       mListeners[i].mHasSentData = true;
       mListeners[i].mListener->OnChange(ac.Elements(), ac.Length());
     }
   }