Bug 817901 - Wi-Fi hotspot (Open) cannot be turned on with empty password. r=gal a=blocking-basecamp
authorVincent Chang <vchang@mozilla.com>
Wed, 05 Dec 2012 17:57:59 +0800
changeset 117357 55b63c25510abb7cc73b8c26b62781cb18f98feb
parent 117356 e33dbe505ee00f5190978618286e0081f8d53981
child 117358 20204a219d86b78374d25f5b7e0ac44619844b26
push id1857
push usercjones@mozilla.com
push dateThu, 06 Dec 2012 09:04:43 +0000
treeherdermozilla-beta@20204a219d86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgal, blocking-basecamp
bugs817901
milestone18.0
Bug 817901 - Wi-Fi hotspot (Open) cannot be turned on with empty password. r=gal a=blocking-basecamp
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;