Bug 1018164 - Fix IP address recovery in PushService. r=nsm
authorFernando Rodriguez Sela <frsela@tid.es>
Tue, 03 Jun 2014 23:45:00 -0400
changeset 206949 66fb92de1240258bf9d36673282c8abaf6365b96
parent 206948 4265f3812f03d522ea29048289880a07620cd893
child 206950 85db97aa8845829bda33e6c8ad23c725a044ca10
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnsm
bugs1018164
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1018164 - Fix IP address recovery in PushService. r=nsm
dom/push/src/PushService.jsm
--- a/dom/push/src/PushService.jsm
+++ b/dom/push/src/PushService.jsm
@@ -1489,20 +1489,23 @@ this.PushService = {
         // In Multi-sim, there is more than one client in iccProvider. Each
         // client represents a icc service. To maintain backward compatibility
         // with single sim, we always use client 0 for now. Adding support
         // for multiple sim will be addressed in bug 927721, if needed.
         let clientId = 0;
         let iccInfo = icc.getIccInfo(clientId);
         if (iccInfo) {
           debug("Running on mobile data");
+          let ips = {};
+          let prefixLengths = {};
+          nm.active.getAddresses(ips, prefixLengths);
           return {
             mcc: iccInfo.mcc,
             mnc: iccInfo.mnc,
-            ip:  nm.active.ip
+            ip:  ips.value[0]
           }
         }
       }
     } catch (e) {}
 
     debug("Running on wifi");
 
     return {