diff options
author | Havoc Pennington <hp@redhat.com> | 2007-06-12 18:53:32 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2007-06-12 18:53:32 +0000 |
commit | 1680f1fb403db648c1a9ebc45873df44dcfde6ef (patch) | |
tree | 9258e379e2af6c690c132119aec461925aa7fbb4 /dbus/dbus-marshal-recursive.c | |
parent | 94125e89b6be74cb20100d5321a98aa6529187a9 (diff) |
2007-06-12 Havoc Pennington <hp@redhat.com>
* dbus/dbus-marshal-recursive.c (write_or_verify_typecode):
improve the warning a bit if you write extra data into a message
Diffstat (limited to 'dbus/dbus-marshal-recursive.c')
-rw-r--r-- | dbus/dbus-marshal-recursive.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index d47d200b..b16f4ea5 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -1702,8 +1702,12 @@ write_or_verify_typecode (DBusTypeWriter *writer, if (expected != typecode) { - _dbus_warn_check_failed ("Array or variant type requires that type %s be written, but %s was written\n", - _dbus_type_to_string (expected), _dbus_type_to_string (typecode)); + if (expected != DBUS_TYPE_INVALID) + _dbus_warn_check_failed ("Array or variant type requires that type %s be written, but %s was written\n", + _dbus_type_to_string (expected), _dbus_type_to_string (typecode)); + else + _dbus_warn_check_failed ("Array or variant type wasn't expecting any more values to be written into it, but a value %s was written\n", + _dbus_type_to_string (typecode)); _dbus_assert_not_reached ("bad type inserted somewhere inside an array or variant"); } } |