Include reason when reporting corrupt messages

It would have been much easier to diagnose fd.o#19723 if the error
message had said more than just "Message is corrupted".
This commit is contained in:
Will Thompson 2009-08-08 13:57:11 +01:00
parent 7689d71257
commit 6b240a12e2

View 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;