]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Include reason when reporting corrupt messages
authorWill Thompson <will.thompson@collabora.co.uk>
Sat, 8 Aug 2009 12:57:11 +0000 (13:57 +0100)
committerColin Walters <walters@verbum.org>
Thu, 28 Jan 2010 22:01:23 +0000 (17:01 -0500)
It would have been much easier to diagnose fd.o#19723 if the error
message had said more than just "Message is corrupted".

dbus/dbus-message.c

index b7b5afcabc983ab1b9df6dae17855fe123f61d2e..0b81806fae640ef8da76bcb374d91a6787e417e1 100644 (file)
@@ -4091,7 +4091,8 @@ dbus_message_demarshal (const char *str,
   return msg;
 
  fail_corrupt:
-  dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, "Message is corrupted");
+  dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, "Message is corrupted (%s)",
+                  _dbus_validity_to_error_message (loader->corruption_reason));
   _dbus_message_loader_unref (loader);
   return NULL;