Hi Patrik, On Mon, Feb 07, 2011 at 09:33:48AM +0200, Patrik Flykt wrote: > On Fri, 2011-02-04 at 17:09 +0100, ext Samuel Ortiz wrote: > > > + if (strncmp(key, "psk", 4) == 0 || > > 4 ? If you meant 3 I can fix it myself and apply those patches. > > Otherwise, you'll have to explain :) > > "psk" is the full name of the argument, and so the idea was to match > also the trailing \0 with number 4. The initial use of strcmp was to try > to signal the reader that the whole null terminated string is to be > matched. When the strncmp match is limited to three, everything starting > with psk* would match, which was not the intention. I didn't notice > anything else in wpa_supplicant starting with the letters 'psk', though. > > On the line below that one, strncmp(key, "wep_key, 7) would match any of > wep_key0, wep_key1, wep_key2 and wep_key3 which is precisely as intended Yes, I got this one, but I didn't get why the 4 with psk since wpa_supplicant doesn't seem to give anything else. But fair enough, all your 4 patches are applied now. Thanks a lot.
Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman