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

Re: [libvirt] [PATCH 02/12] Provide a simple object for encoding/decoding RPC messages



On 03/18/2011 12:54 PM, Daniel P. Berrange wrote:
> This provides a new struct that contains a buffer for the RPC
> message header+payload, as well as a decoded copy of the message
> header. There is an API for applying a XDR encoding & decoding
> of the message headers and payloads. There are also APIs for
> maintaining a simple FIFO queue of message instances.
> 
> Expected usage scenarios are:
> 
> To send a message
> 
>    msg = virNetMessageNew()
> 
>    ...fill in msg->header fields..
>    virNetMessageEncodeHeader(msg)
>    ...loook at msg->header fields to determine payload filter

s/loook/look/

> +int virNetMessageEncodePayload(virNetMessagePtr msg,
> +                               xdrproc_t filter,
> +                               void *data)
> +    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;

Redundant ATTRIBUTE_NONNULL(2).  Since data is opaque to us, it is
feasible to have a filter that accepts NULL; therefore, just delete the
second instance (and don't change 2 to 3).

> +int virNetMessageDecodePayload(virNetMessagePtr msg,
> +                               xdrproc_t filter,
> +                               void *data)
> +    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;

Likewise.

ACK with those nits fixed.

-- 
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]