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 committed by Colin Walters
parent ce87333cac
commit 7cf332d34e

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