Re: [RFC] [PATCH] WPA PSK support for netcfg
-----BEGIN PGP SIGNED MESSAGE-----
Jérémy Bobbio wrote:
> On Sat, Apr 19, 2008 at 03:00:59PM +0800, Glenn Saberton wrote:
>>> Why not do some refactoring then? Or sharing the code altogether?
>> If there are no objections, I will add the functions to dhcp.c which
>> will address the global variable above also
> Well, for the global variable, I am not truely sure that you can avoid
> it without some pretty invasive refactoring, so just leave it for now,
yep, need to rethink that one.
>> Thanks to all for comments so far.
> You're welcome. Please get back to us once you will have a nice and
> clean patchset. :) And don't hesitate to test preseeding as well
> (passing "question=value" on the command-line is enough).
will do once I have the signal problem sorted.
>> The attached patch just adds the reconfigure_wifi() function to dhcp.c
>> It improves readability (i think) and also fixes an unreported bug
>> where netcfg always returns to ASK_OPTIONS after reconfiguring wifi,
>> instead of polling/starting dhcp.
> Please be *very* careful with this kind of assumptions. The
> debian-installer has a pretty long history already, and some code that
> look behave strangely at first actually solve a real issue. This has
> already bitten me once or twice, so please check the code history ("git
> blame" or graphical git interfaces are very good to do that), to see in
> which context the code was written like it currently is.
Point taken. Only reason I state this, is that originally I was working
within the switch and adding my wpa functions to it. I was tearing my
hair out wondering why it was always returning to ASK_OPTIONS. I thought
it was in my code and couldn't work it out. After removing the nested
switch and adding the function, it worked properly. I just retested with
an unmodified netcfg to make sure I have my story straight, and it
appears to be the case AFAICT.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----