Appending arrays of fixed arrays of bytes.

Christian Hammond chipx86 at gmail.com
Tue Jul 26 11:07:35 EST 2005


Sorry, the example doesn't show it, though I mention it further down,
but to be clear, I'm trying to append an array of an array of bytes.
In the actual codebase, it's frames of an animation.

Christian

On 7/25/05, Christian Hammond <chipx86 at gmail.com> wrote:
> 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,
> DBUS_TYPE_STRING_AS_STRING, &array_iter);
> 
> for (i = 0; i < count; i++)
> {
>     dbus_message_iter_append_fixed_array(&array_iter, info[i].data,
> info[i].len);
> }
> 
> 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."
> 
> Christian
> 
> On 7/24/05, Havoc Pennington <hp at redhat.com> 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 verbum.org> 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