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 120759 3e3b0aa054745aaa9569c0c3e198724bc1da47fd
parent 120758 747b04228fa634553305663035edc0641b9c533d
child 120760 9aa728193de2d51dc84d104218203238435bad5a
push idunknown
push userunknown
push dateunknown
reviewersgal
bugs817901
milestone20.0a1
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;