clochix/FxStumbler — pull request #30 by wanderview (2014-06-17 18:26:39+00:00)
Title: Fix dual-sim radio reporting

There is a small bug in the multiple-radio code. It iterates over the mozMobileConnections, populates the `cell` object, and then appends this to the `cells` array.

Unfortunately the `cell` object is declared outside of the loop and never re-initialized. So each time through the loop we modify the same object and push it on the array again.

The result is we report the last radio seen multiple times and ignore the first radio seen.

The solution is to move the `cell` object into the loop scope.