Bug 1095177 - [Internet Sharing] Hotspot network cannot be seen by other devices. r=jjong
authorVincent Chang <vchang@mozilla.com>
Fri, 28 Nov 2014 16:08:41 +0800
changeset 243862 3d56e310386e43a8f908ef8789d1983e205ea8b3
parent 243861 0b338c05b8654ec36d6f2e2e93ea27a376b984b3
child 243863 13d2e1caa114afd83862ca37caa51ca762abf247
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjjong
bugs1095177
milestone36.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 1095177 - [Internet Sharing] Hotspot network cannot be seen by other devices. r=jjong
dom/system/gonk/NetworkManager.js
--- a/dom/system/gonk/NetworkManager.js
+++ b/dom/system/gonk/NetworkManager.js
@@ -992,17 +992,17 @@ NetworkManager.prototype = {
     }
 #endif
 
     if (this.active) {
       this._tetheringInterface[TETHERING_TYPE_USB].externalInterface = this.active.name;
     } else {
       let mobile = this.getNetworkInterface(
         Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE, this._dataDefaultServiceId);
-      if (mobile) {
+      if (mobile && mobile.name) {
         this._tetheringInterface[TETHERING_TYPE_USB].externalInterface = mobile.name;
       }
     }
     gNetworkService.enableUsbRndis(true, this.enableUsbRndisResult.bind(this));
   },
 
   getUSBTetheringParameters: function(enable, tetheringinterface) {
     let interfaceIp;
@@ -1137,17 +1137,17 @@ NetworkManager.prototype = {
       }.bind(this, config, callback));
       return;
     }
 #endif
 
     let mobile = this.getNetworkInterface(
       Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE, this._dataDefaultServiceId);
     // Update the real interface name
-    if (mobile) {
+    if (mobile && mobile.name) {
       this._tetheringInterface[TETHERING_TYPE_WIFI].externalInterface = mobile.name;
     }
 
     this.enableWifiTethering(true, config, callback);
   },
 
   // Enable/disable USB tethering by sending commands to netd.
   setUSBTethering: function(enable, tetheringInterface, callback) {