Re: [PATCH 5/9] Improve two log messages in virNetMessage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/28/2011 11:01 AM, Daniel P. Berrange wrote:
> Improve log messages issued when encountering a bogus
> message length to include the actual length and the
> limit violated
> 
> * src/rpc/virnetmessage.c: Improve log messages
> ---
>  src/rpc/virnetmessage.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c
> index a7a25b1..0725491 100644
> --- a/src/rpc/virnetmessage.c
> +++ b/src/rpc/virnetmessage.c
> @@ -101,8 +101,9 @@ int virNetMessageDecodeLength(virNetMessagePtr msg)
>      msg->bufferOffset = xdr_getpos(&xdr);
>  
>      if (len < VIR_NET_MESSAGE_LEN_MAX) {
> -        virNetError(VIR_ERR_RPC, "%s",
> -                    _("packet received from server too small"));
> +        virNetError(VIR_ERR_RPC,
> +                    _("packet %d bytes received from server too small, want %d"),
> +                    len, VIR_NET_MESSAGE_LEN_MAX);

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]