Appending arrays of fixed arrays of bytes.

Christian Hammond chipx86 at
Tue Jul 26 11:03:13 EST 2005

I guess I hit reply when I composed my last answer to this, rather
than Reply to all. The e-mail never appeared in the listserv archives.

This is using plain libdbus.

I've tried a couple ways. First way:

DBusMessageIter array_iter;
dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY_AS_STRING,

for (i = 0; i < count; i++)
    dbus_message_iter_append_fixed_array(&array_iter, info[i].data,

dbus_message_iter_close_container(&iter, &array_iter);

This method generates the following error:

"assertion failed "len <= real_source->len - start" file
"dbus-string.c" line 1576 function _dbus_string_copy_len"

I have also tried the above, but with DBUS_TYPE_ARRAY_AS_STRING
DBUS_TYPE_BYTE_AS_STRING, thinking that maybe it required something
similar to how structs worked. However, that also failed.

"arguments to dbus_message_iter_open_container() were incorrect,
assertion "_dbus_message_iter_append_check (real)" failed in file
dbus-message.c line 2229."


On 7/24/05, Havoc Pennington <hp at> wrote:
> On Sat, 2005-07-23 at 17:24 -0700, Christian Hammond wrote:
> > Any update on this? This is proving very problematic. I can't even
> > find arrays of arrays of a type being tested anywhere.
> You need to give more info:
> > On 7/17/05, Colin Walters <walters at> wrote:
> > >
> > > Using libdbus?  Or the GLib bindings?  Python bindings?
> Also, how are you trying to do it, and which type is in the array?
> Havoc

More information about the dbus mailing list