Last Comment Bug 736196 - Wifi: Fix handling of passwords
: Wifi: Fix handling of passwords
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Blake Kaplan (:mrbkap)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: b2g-wifi
  Show dependency treegraph
 
Reported: 2012-03-15 11:40 PDT by Blake Kaplan (:mrbkap)
Modified: 2012-03-19 12:28 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (3.80 KB, patch)
2012-03-15 11:40 PDT, Blake Kaplan (:mrbkap)
cjones.bugs: review+
Details | Diff | Splinter Review

Description Blake Kaplan (:mrbkap) 2012-03-15 11:40:37 PDT
Created attachment 606308 [details] [diff] [review]
Patch

The version of the wifi patch that landed mishandles passwords for networks that we want to reconnect to, but don't want to update the password for. In the patch, I also update our internal representation of the network when we update it.
Comment 1 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-15 19:40:54 PDT
Comment on attachment 606308 [details] [diff] [review]
Patch

>diff --git a/dom/wifi/nsWifiWorker.js b/dom/wifi/nsWifiWorker.js

>@@ -1438,6 +1452,7 @@ nsWifiWorker.prototype = {
>         networkReady();
>       }).bind(this));
>     } else {
>+      privnet.disabled = 0;

What is this doing?

The rest looks OK.
Comment 2 Blake Kaplan (:mrbkap) 2012-03-16 04:09:16 PDT
(In reply to Chris Jones [:cjones] [:warhammer] from comment #1)
> >+      privnet.disabled = 0;
> 
> What is this doing?

By default, networks added by add_network are disabled and need an explicit enableNetwork call to enable them. However, here we do:

add_network
set_network_config
save_config
enable_network (and disable others)

which means that wpa_supplicant saves the network as being disabled. Because we want our networks to be enabled by default, we want to make sure to enable the network before the save_config. This ensures that the new network is remembered as being enabled.
Comment 3 Blake Kaplan (:mrbkap) 2012-03-16 04:09:45 PDT
Comment on attachment 606308 [details] [diff] [review]
Patch

I'll add a comment to that effect before checkin.
Comment 4 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-19 10:21:28 PDT
Comment on attachment 606308 [details] [diff] [review]
Patch

r=me with comment added
Comment 5 Blake Kaplan (:mrbkap) 2012-03-19 12:28:01 PDT
https://hg.mozilla.org/mozilla-central/rev/ca1b5de7c0eb

Note You need to log in before you can comment on or make changes to this bug.