potential error in DBus code?

Johannes Berg johannes at sipsolutions.net
Wed Dec 8 05:27:20 EST 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