Hi Tomasz,
On Wed, Jun 01, 2011 at 02:48:58PM +0000, Tomasz Bursztyka wrote:
> ---
> gsupplicant/supplicant.c | 29 +++++++++++++++++++++++++++--
> 1 files changed, 27 insertions(+), 2 deletions(-)
The patch looks good, I just have one tiny comment:
> diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
> index 2c3e5dd..e6cdc34 100644
> --- a/gsupplicant/supplicant.c
> +++ b/gsupplicant/supplicant.c
> @@ -2554,13 +2554,38 @@ static void add_network_security_wep(DBusMessageIter
> *dict,
> }
> }
>
> +static dbus_bool_t is_psk_raw_key(const char *psk)
> +{
> + int i;
> +
> + /* A raw key is always 64 bytes length... */
> + if (strlen(psk) != 64)
> + return FALSE;
> +
> + /* ... and its content is in hex representation */
> + for (i = 0; i < 64; i++)
> + if (!((psk[i] >= 'a' && psk[i] <= 'f') ||
> + (psk[i] >= 'A' && psk[i] <= 'F') ||
> + (psk[i] >= '0' && psk[i] <= '9')))
isxdigit() is your friend here.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman