How to use variant
Naveen Verma
ernaveenverma at gmail.com
Sun Jul 8 14:45:46 PDT 2007
Hi,
I have a function which return a variant. But whenever I am trying to call
the function. I receive an error and program terminates. I am unable to
understand what is the reason.
May be I am not creating the variant in correct way. Could anyone please
check the code and error below, and give me an idea what is wrong?
DBus::Variant Test::getTestValue()
{
DBus::Variant var;
DBus::MessageIter i = var.writer();
MessageIter j = i.new_variant("s");
j.append_string("Test");
i.close_container(j);
return var;
}
And the error message is:
process 6933: arguments to dbus_message_iter_open_container() were
incorrect, assertion "(type == DBUS_TYPE_STRUCT && contained_signature ==
NULL) || (type == DBUS_TYPE_DICT_ENTRY && contained_signature == NULL) ||
contained_signature != NULL" failed in file dbus-message.c line 2330.
This is normally a bug in some application using the D-Bus library.
-Thanks & Regards
Naveen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20070709/09d51b38/attachment.htm
More information about the dbus
mailing list