From 8ab042b9571dda44a5afcfe50e0d29dc9b58ecae Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 31 Jan 2003 13:36:36 +0000 Subject: 2003-01-31 Anders Carlsson * dbus/dbus-address.c: (dbus_address_entry_free): Free key and value lists. * dbus/dbus-internals.c: (_dbus_type_to_string): Add the types we didn't have. * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg): Add NIL types. * dbus/dbus-message.c: (dbus_message_set_sender): Remove todo about being able to set sender to NULL. (dbus_message_set_is_error_reply), (dbus_message_get_is_error_reply): * dbus/dbus-message.h: New functions. * dbus/dbus-protocol.h: Add error reply flag. * test/data/valid-messages/opposite-endian.message: Add NIL type to test. --- dbus/dbus-marshal.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'dbus/dbus-marshal.c') diff --git a/dbus/dbus-marshal.c b/dbus/dbus-marshal.c index efdc7efb..a31e0f49 100644 --- a/dbus/dbus-marshal.c +++ b/dbus/dbus-marshal.c @@ -875,6 +875,9 @@ _dbus_marshal_get_arg_end_pos (const DBusString *str, return FALSE; break; + case DBUS_TYPE_NIL: + *end_pos = pos + 1; + case DBUS_TYPE_INT32: *end_pos = _DBUS_ALIGN_VALUE (pos + 1, sizeof (dbus_int32_t)) + sizeof (dbus_int32_t); @@ -989,6 +992,7 @@ _dbus_marshal_get_arg_end_pos (const DBusString *str, * @param str the string * @param byte_order the byte order * @param pos the unaligned string position (snap to next aligned) + * @param new_pos return location for new position. */ static int demarshal_and_validate_len (const DBusString *str, @@ -1095,6 +1099,10 @@ _dbus_marshal_validate_arg (const DBusString *str, case DBUS_TYPE_INVALID: return FALSE; break; + + case DBUS_TYPE_NIL: + *end_pos = pos + 1; + break; case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: -- cgit