Last Comment Bug 722318 - Fix race in connect_to_supplicant
: Fix race in connect_to_supplicant
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla12
Assigned To: Blake Kaplan (:mrbkap) (please use needinfo!)
:
Mentors:
Depends on:
Blocks: b2g-wifi
  Show dependency treegraph
 
Reported: 2012-01-30 07:27 PST by Blake Kaplan (:mrbkap) (please use needinfo!)
Modified: 2012-01-31 06:58 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Proposed fix (2.34 KB, patch)
2012-01-30 07:31 PST, Blake Kaplan (:mrbkap) (please use needinfo!)
gal: review+
mwu.code: feedback+
mrbkap: checkin+
Details | Diff | Review

Description Blake Kaplan (:mrbkap) (please use needinfo!) 2012-01-30 07:27:50 PST
Right now, nsWifiWorker.js assumes that connect_to_supplicant always returns before the supplicant has made its connection to the network. If this isn't the case, then it doesn't do any sort of DHCP/DNS stuff, leaving the network in an inconsistent state (up but with no IP).

There's an easy fix for this that I'll attach. I had to hack my version of nsWifiWorker.js to even test this fix (since for me connect_to_supplicant always does return before we connect) so if this doesn't work for you, let me know.
Comment 1 Blake Kaplan (:mrbkap) (please use needinfo!) 2012-01-30 07:31:32 PST
Created attachment 592709 [details] [diff] [review]
Proposed fix

This should be pretty straightforward. I also took this opportunity to get rid of the debugging "automatically connect to Mozilla Guest" code. If you think we should leave it in for now, let me know.
Comment 2 Michael Wu [:mwu] 2012-01-30 10:15:07 PST
Comment on attachment 592709 [details] [diff] [review]
Proposed fix

Works for me.
Comment 3 Blake Kaplan (:mrbkap) (please use needinfo!) 2012-01-30 15:53:13 PST
Comment on attachment 592709 [details] [diff] [review]
Proposed fix

https://hg.mozilla.org/integration/mozilla-inbound/rev/c52ce509a5c3
Comment 4 Ed Morley [:emorley] 2012-01-31 06:58:21 PST
https://hg.mozilla.org/mozilla-central/rev/c52ce509a5c3

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