]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
* dbus/dbus-message.c (dbus_message_iter_open_container):
authorJohn (J5) Palmieri <johnp@redhat.com>
Thu, 10 Feb 2005 04:36:23 +0000 (04:36 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Thu, 10 Feb 2005 04:36:23 +0000 (04:36 +0000)
    - Removed check for iterator type being an array because
get_arg_type does not work with writer iterators
- Pass NULL to _dbus_type_writer_recurse if signiture is NULL

ChangeLog
dbus/dbus-message.c

index 68a8b7ab63ed38c0b4165bed3b37914ef3f464c9..250931570dff36ca4b87a2f3d5743bb1cb619433 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
+
+       * dbus/dbus-message.c (dbus_message_iter_open_container):
+       - Removed check for iterator type being an array because
+       get_arg_type does not work with writer iterators
+       - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
+
 2005-02-07  Havoc Pennington  <hp@redhat.com>
 
        * doc/dbus-specification.xml: some more language cleanups; add
index a28525580f72d49ede2572347b82a86ab6c45299..537f857baafae5abdcb49cb127e57cee3e303fea 100644 (file)
@@ -2160,9 +2160,6 @@ dbus_message_iter_open_container (DBusMessageIter *iter,
                             (type == DBUS_TYPE_DICT_ENTRY &&
                              contained_signature == NULL) ||
                             contained_signature != NULL, FALSE);
-  _dbus_return_val_if_fail (type != DBUS_TYPE_DICT_ENTRY ||
-                            dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_ARRAY,
-                            FALSE);
   
 #if 0
   /* FIXME this would fail if the contained_signature is a dict entry,
@@ -2176,13 +2173,24 @@ dbus_message_iter_open_container (DBusMessageIter *iter,
   if (!_dbus_message_iter_open_signature (real))
     return FALSE;
 
-  _dbus_string_init_const (&contained_str, contained_signature);
-
   *real_sub = *real;
-  return _dbus_type_writer_recurse (&real->u.writer,
-                                    type,
-                                    &contained_str, 0,
-                                    &real_sub->u.writer);
+
+  if (contained_signature != NULL)
+    {
+      _dbus_string_init_const (&contained_str, contained_signature);
+
+      return _dbus_type_writer_recurse (&real->u.writer,
+                                        type,
+                                        &contained_str, 0,
+                                        &real_sub->u.writer);
+    }
+  else
+    {
+      return _dbus_type_writer_recurse (&real->u.writer,
+                                        type,
+                                        NULL, 0,
+                                        &real_sub->u.writer);
+    } 
 }