On Tue, 2015-07-07 at 02:38 -0700, Adam Moore wrote:
> Read Agent provided SSID as an array of bytes and recurse where needed

Doesn't apply upstream, please rebase.

Cheers,

        Patrik

> ---
>  src/agent-connman.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/src/agent-connman.c b/src/agent-connman.c
> index 8440451..1b6f8a3 100644
> --- a/src/agent-connman.c
> +++ b/src/agent-connman.c
> @@ -141,17 +141,20 @@ static void request_input_passphrase_reply(DBusMessage 
> *reply, void *user_data)
>                         name_len = strlen(name);
>                 } else if (g_str_equal(key, "SSID")) {
>                         dbus_message_iter_next(&entry);
> +                       DBusMessageIter *array_iter = NULL;
>                         if (dbus_message_iter_get_arg_type(&entry)
>                                                         != DBUS_TYPE_VARIANT)
>                                 break;
>                         dbus_message_iter_recurse(&entry, &value);
>                         if (dbus_message_iter_get_arg_type(&value)
> -                                                       != DBUS_TYPE_VARIANT)
> +                                                       != DBUS_TYPE_ARRAY)
>                                 break;
> -                       if (dbus_message_iter_get_element_type(&value)
> -                                                       != DBUS_TYPE_VARIANT)
> +
> +                       dbus_message_iter_recurse(&value, &array_iter);
> +                       if (dbus_message_iter_get_arg_type(&array_iter)
> +                                                       != DBUS_TYPE_BYTE)
>                                 break;
> -                       dbus_message_iter_get_fixed_array(&value, &name,
> +                       dbus_message_iter_get_fixed_array(&array_iter, &name,
>                                                         &name_len);
>                 }
>                 dbus_message_iter_next(&dict);
> --
> 1.9.1
> 
> 
> Statement of Confidentiality
> 
> The contents of this e-mail message and any attachments are confidential and 
> are intended solely for the addressee. The information may also be legally 
> privileged. This transmission is sent in trust, and the sole purpose of 
> delivery to the intended recipient. If you have received this transmission in 
> error, any use, reproduction or dissemination of this transmission is 
> strictly prohibited. If you are not the intended recipient, please 
> immediately notify the sender by reply e-mail or at 508.683.2500 and delete 
> this message and its attachments, if any.
> 
> _______________________________________________
> connman mailing list
> connman@connman.net
> https://lists.connman.net/mailman/listinfo/connman


_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to