Bug 817901 - Wi-Fi hotspot (Open) cannot be turned on with empty password. r=gal
authorVincent Chang <vchang@mozilla.com>
Wed, 05 Dec 2012 17:57:59 +0800
changeset 115188 3e3b0aa054745aaa9569c0c3e198724bc1da47fd
parent 115187 747b04228fa634553305663035edc0641b9c533d
child 115189 9aa728193de2d51dc84d104218203238435bad5a
push id23991
push useremorley@mozilla.com
push dateFri, 07 Dec 2012 14:14:29 +0000
treeherdermozilla-central@8432562db685 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgal
bugs817901
milestone20.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 817901 - Wi-Fi hotspot (Open) cannot be turned on with empty password. r=gal
dom/system/gonk/NetworkManager.js
--- a/dom/system/gonk/NetworkManager.js
+++ b/dom/system/gonk/NetworkManager.js
@@ -596,17 +596,17 @@ NetworkManager.prototype = {
     }
     if (securityType != WIFI_SECURITY_TYPE_NONE &&
         securityType != WIFI_SECURITY_TYPE_WPA_PSK &&
         securityType != WIFI_SECURITY_TYPE_WPA2_PSK) {
 
       debug("Invalid security type.");
       return null;
     }
-    if (!securityId) {
+    if (securityType != WIFI_SECURITY_TYPE_NONE && !securityId) {
       debug("Invalid security password.");
       return null;
     }
     // Using the default values here until application supports these settings.
     if (interfaceIp == "" || prefix == "" ||
         dhcpStartIp == "" || dhcpEndIp == "") {
       debug("Invalid subnet information.");
       return null;