diff options
| author | John (J5) Palmieri <johnp@redhat.com> | 2005-02-10 04:36:23 +0000 | 
|---|---|---|
| committer | John (J5) Palmieri <johnp@redhat.com> | 2005-02-10 04:36:23 +0000 | 
| commit | 8fda602e991990d21f196e65d917a481c6ec1360 (patch) | |
| tree | 9b8746f4fb97e85bd2037c7839c694350aec2c62 | |
| parent | 01f18bcc6770b40ab4f5154afcd1673caf6250c1 (diff) | |
 * 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
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | dbus/dbus-message.c | 26 | 
2 files changed, 24 insertions, 9 deletions
| @@ -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 diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index a2852558..537f857b 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -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); +    }   } | 
