GVariant keeps body inside structs. This fact is kept hidden from
libdbus user. Thus, struct parentheses have to be added, removed
in proper places. There was one such place in
_dbus_type_reader_gvariant_init(). However, it was not sufficient
and get_const_signature() also got stripping code. Unfortunately,
I didn't notice that stripping should be removed in the first
of these functions. This commit fixes that.
Change-Id: I5c2e6c7c8212d283fd6da1cc998a2711038905f3
DBusMessage *message)
{
reader->gvariant = TRUE;
- /* GVariant wraps contents into struct */
- if (_dbus_string_get_byte (reader->type_str, reader->type_pos) == DBUS_STRUCT_BEGIN_CHAR)
- {
- reader->type_pos++;
- if (_dbus_string_get_byte (reader->type_str, reader->type_pos) == DBUS_STRUCT_END_CHAR)
- reader->finished = TRUE;
- }
+ /* GVariant wraps contents into struct, but in this place type is already
+ * stripped off the parentheses (see get_const_signature()).
+ */
reader->value_end = _dbus_message_gvariant_get_body_length (message);
reader->n_offsets = _dbus_reader_count_offsets (reader);