[PATCH 02/15] WPS: credentials signal support added in gsupplicant library.

Samuel Ortiz sameo at linux.intel.com
Fri Jan 21 16:10:57 PST 2011


Hi Tomasz,

On Tue, Jan 11, 2011 at 03:53:55PM +0200, Tomasz Bursztyka wrote:
> +const void *g_supplicant_interface_get_wps_ssid(GSupplicantInterface *interface,
> +							unsigned int *ssid_len)
This is more than 80 chars long.


> +static void wps_credentials(const char *key, DBusMessageIter *iter,
> +			void *user_data)
> +{
> +	GSupplicantInterface *interface = user_data;
> +
> +	if (key == NULL)
> +		return;
> +
> +	SUPPLICANT_DBG("key %s", key);
> +
> +	if (g_strcmp0(key, "Key") == 0) {
> +		DBusMessageIter array;
> +		unsigned char *key;
> +		int key_len;
> +
> +		dbus_message_iter_recurse(iter, &array);
> +		dbus_message_iter_get_fixed_array(&array, &key, &key_len);
> +
> +		g_free(interface->wps_cred.key);
> +		interface->wps_cred.key = g_try_malloc0(
> +						sizeof(char) * key_len+1);
You'll have to free interface->wps_cred.key from remove_interface().

Cheers,
Samuel.
-- 
Intel Open Source Technology Centre
http://oss.intel.com/



More information about the connman mailing list