dbus/dbus dbus-message.c,1.161,1.162

John Palmieri johnp at freedesktop.org
Wed Feb 9 20:36:25 PST 2005


Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv24899/dbus

Modified Files:
	dbus-message.c 
Log Message:
 * 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
			 


Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- dbus-message.c	6 Feb 2005 04:21:57 -0000	1.161
+++ dbus-message.c	10 Feb 2005 04:36:23 -0000	1.162
@@ -2160,9 +2160,6 @@
                             (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 @@
   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);
+    } 
 }
 
 



More information about the dbus-commit mailing list