]> 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)
committerWill Thompson <will.thompson@collabora.co.uk>
Sun, 1 Nov 2009 14:32:35 +0000 (14:32 +0000)
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 72d3be815c40be8675149320dcaec7de6a490452..88f195a8b0c3bfaf439a1ac93571b886d9f45700 100644 (file)
@@ -4567,7 +4567,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;