From: Will Thompson Date: Sat, 8 Aug 2009 12:57:11 +0000 (+0100) Subject: Include reason when reporting corrupt messages X-Git-Tag: dbus-1.2.18~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cf332d34ea974b9781f47f4af4efca4de71b96a;p=thirdparty%2Fdbus.git 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". --- diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index b7b5afcab..0b81806fa 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -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;