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

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

 



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