Bug 785620 - B2G RIL: datacall.dns is null. r=philikon
authorShian-Yow Wu <swu@mozilla.com>
Sat, 25 Aug 2012 22:29:07 -0400
changeset 105505 c4f20a024113801c6df7037d6cbb391f8fe96f4d
parent 105504 f551e52160e062737ea77c0b1eece31000c81ddd
child 105506 f26d6c5a2d93719516da85b0481d173fa8a5a8c4
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersphilikon
bugs785620
milestone17.0a1
Bug 785620 - B2G RIL: datacall.dns is null. r=philikon
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -1775,18 +1775,20 @@ let RILNetworkInterface = {
          datacall.state == RIL.GECKO_NETWORK_STATE_CONNECTED)) {
       this.connecting = false;
       this.cid = datacall.cid;
       this.name = datacall.ifname;
       this.ip = datacall.ip;
       this.netmask = datacall.netmask;
       this.broadcast = datacall.broadcast;
       this.gateway = datacall.gw;
-      this.dns1 = datacall.dns[0];
-      this.dns2 = datacall.dns[1];
+      if (datacall.dns) {
+        this.dns1 = datacall.dns[0];
+        this.dns2 = datacall.dns[1];
+      }
       if (!this.registeredAsNetworkInterface) {
         let networkManager = Cc["@mozilla.org/network/manager;1"]
                                .getService(Ci.nsINetworkManager);
         networkManager.registerNetworkInterface(this);
         this.registeredAsNetworkInterface = true;
       }
     }
     if (this.cid != datacall.cid) {