potential error in DBus code?

Johannes Berg johannes
Wed Dec 8 02:27:20 PST 2010


I'm a little confused now. We have this code:

wpa_dbus_dict_begin_string_array:

        if (!dbus_message_iter_open_container(iter_dict_entry,
                                              DBUS_TYPE_VARIANT,
                                              DBUS_TYPE_ARRAY_AS_STRING
                                              DBUS_TYPE_STRING_AS_STRING,
                                              iter_dict_val))
                return FALSE;

        if (!dbus_message_iter_open_container(iter_dict_val, DBUS_TYPE_ARRAY,
                                              DBUS_TYPE_BYTE_AS_STRING,
                                              iter_array))


and then


wpa_dbus_dict_string_array_add_element:
        return dbus_message_iter_append_basic(iter_array, DBUS_TYPE_STRING,
                                              &elem);


Shouldn't the DBUS_TYPE_BYTE_AS_STRING above be
DBUS_TYPE_STRING_AS_STRING to match the array contents? I can trace this
code all the way back to a commit from 2006 from Dan...

johannes




More information about the Hostap mailing list