Bug 23797 - dbus-c++ & nested variant maps...
Summary: dbus-c++ & nested variant maps...
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
Depends on:
Reported: 2009-09-08 12:33 UTC by Darrell Schiebel
Modified: 2011-01-05 05:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Darrell Schiebel 2009-09-08 12:33:31 UTC
I hesitate to report this since it seems more likely that somehow I am wrong, but... I had to make the following changes to allow me to correctly handle variant maps with nested variant maps, i.e. it seems like this logical expression (below) is exactly opposite of what it should be. Prior to this change, I got errors like:
process 10525: 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) || (type == DBUS_TYPE_VARIANT && contained_signature != NULL) || (type == DBUS_TYPE_ARRAY && contained_signature != NULL)" failed in file dbus-message.c line 2360.
and in looking at dbus-message.c from dbus-1.2.14, it seems like my interpretation is correct. I tested with a std::map<std::string,DBus::Variant> which had a std::map<std::string,DBus::Variant> as one of its DBusVariant members.


--- dbus-c++/src/message.cpp	2009-09-08 15:20:51.000000000 -0400
+++ dbus-c++-0.5.0/src/message.cpp	2009-09-08 14:38:29.000000000 -0400
@@ -21,9 +21,6 @@
-#include <config.h>
 #include <dbus-c++/message.h>
@@ -350,7 +347,7 @@
 				(DBusMessageIter *)&(to._iter),
-				from.type() == DBUS_TYPE_VARIANT ? NULL : sig,
+				from.type() == DBUS_TYPE_DICT_ENTRY || from.type() == DBUS_TYPE_STRUCT? NULL : sig,
 				(DBusMessageIter *)&(to_container._iter)
Comment 1 Simon McVittie 2011-01-05 05:05:09 UTC
dbus-c++ <http://sourceforge.net/projects/dbus-cplusplus/> has its own bug
tracker and is no longer hosted here. Please open a bug over there.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.