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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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