summaryrefslogtreecommitdiffstats
path: root/test/data/valid-messages
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-03-16 13:32:10 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-03-16 13:32:10 +0000
commite537e421ff4f092621fcd9f6b51526a017ad020c (patch)
tree715e2308ad24b81c56d10d610ce51bf9600a1f0c /test/data/valid-messages
parent5c53fb2a36024c66b3aaa6d26e93a802393664b2 (diff)
2003-03-16 Anders Carlsson <andersca@codefactory.se>
* dbus/dbus-connection.c: (dbus_connection_send_with_reply_and_block): Decrease connection->n_incoming when removing an entry from the list. * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array), (dbus_dict_set_uint32_array), (dbus_dict_set_double_array), (dbus_dict_set_byte_array), (dbus_dict_set_string_array), (dbus_dict_get_boolean_array), (dbus_dict_get_double_array), (dbus_dict_get_byte_array): Handle NULL arrays and strings. Also add support for byte arrays. * dbus/dbus-marshal.c: (_dbus_marshal_byte_array), (_dbus_marshal_dict), (_dbus_demarshal_byte_array), (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array), (_dbus_demarshal_double_array), (_dbus_demarshal_string_array), (_dbus_demarshal_dict), (demarshal_and_validate_len), (_dbus_marshal_validate_arg), (_dbus_marshal_test): * dbus/dbus-marshal.h: Add support for marshalling and demarshalling empty arrays and strings. * dbus/dbus-message.c: (dbus_message_append_args_valist), (dbus_message_append_string_array), (dbus_message_iter_get_boolean), (dbus_message_iter_get_boolean_array), (dbus_message_iter_get_int32_array), (dbus_message_iter_get_uint32_array), (dbus_message_iter_get_double_array), (dbus_message_iter_get_byte_array), (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict), (check_message_handling): Add support for getting empty arrays and dicts. * dbus/dbus-string.c: (_dbus_string_validate_utf8): Don't do any validation at all for now, that's better than just checking for ASCII. * test/data/valid-messages/emptiness.message: New test message with lots of empty arrays.
Diffstat (limited to 'test/data/valid-messages')
-rw-r--r--test/data/valid-messages/emptiness.message44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/data/valid-messages/emptiness.message b/test/data/valid-messages/emptiness.message
new file mode 100644
index 00000000..36f3fc3d
--- /dev/null
+++ b/test/data/valid-messages/emptiness.message
@@ -0,0 +1,44 @@
+# Empty arrays and strings
+
+VALID_HEADER
+FIELD_NAME name
+TYPE STRING
+STRING 'org.freedesktop.Foo'
+END_LENGTH Header
+ALIGN 8
+START_LENGTH Body
+TYPE STRING
+INT32 0
+BYTE 0 # Strings need to be NULL-terminated
+TYPE BOOLEAN_ARRAY
+INT32 0
+TYPE INT32_ARRAY
+INT32 0
+TYPE UINT32_ARRAY
+INT32 0
+TYPE DOUBLE_ARRAY
+INT32 0
+TYPE BYTE_ARRAY
+INT32 0
+TYPE STRING_ARRAY
+INT32 0
+TYPE DICT
+INT32 0
+
+# A dict with empty arrays
+TYPE DICT
+STRING_ARRAY {'boolean_array', 'int32_array' , 'uint32_array', 'double_array', 'byte_array', 'string_array' }
+TYPE BOOLEAN_ARRAY
+INT32 0
+TYPE INT32_ARRAY
+INT32 0
+TYPE UINT32_ARRAY
+INT32 0
+TYPE DOUBLE_ARRAY
+INT32 0
+TYPE BYTE_ARRAY
+INT32 0
+TYPE STRING_ARRAY
+INT32 0
+END_LENGTH Body
+