forked from enlightenment/efl
edbus: Fix type check of solo structs
When reading messages that contain structs the type that comes from the wire (and obtained with dbus_message_iter_get_arg_type()) is 'r'. However 'r' never appears in a signature and dbus_signature_iter_* returns '('. Ref: http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures "STRUCT has a type code, ASCII character 'r', but this type code does not appear in signatures. Instead, ASCII characters '(' and ')' are used to mark the beginning and end of the struct. So for example, a struct containing two integers would have this signature:" Patch by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 78072
This commit is contained in:
parent
ca8f710577
commit
a0cae1706e
|
@ -705,7 +705,12 @@ edbus_message_iter_arguments_vget(EDBus_Message_Iter *iter, const char *signatur
|
|||
|
||||
dbus_free(iter_sig);
|
||||
dbus_signature_iter_next(&signature_iter);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(c == current_type, EINA_FALSE);
|
||||
|
||||
if ((c != current_type) && !(current_type == 'r' && c == '('))
|
||||
{
|
||||
ERR("Type in iterator different of signature");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
if (dbus_type_is_basic(current_type))
|
||||
get_basic(current_type, &iter->dbus_iterator, MAKE_PTR_FROM_VA_LIST(ap));
|
||||
|
|
Loading…
Reference in New Issue