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

Re: [libvirt] [PATCH v3 22/31] Introduce virNetClientStreamRecvHole




On 05/16/2017 10:04 AM, Michal Privoznik wrote:
> This function will fetch previously processed stream holes and
> return their sum.
> 
> Signed-off-by: Michal Privoznik <mprivozn redhat com>
> ---
>  src/libvirt_remote.syms      |  1 +
>  src/rpc/virnetclientstream.c | 16 ++++++++++++++++
>  src/rpc/virnetclientstream.h |  4 ++++
>  3 files changed, 21 insertions(+)
> 
> diff --git a/src/libvirt_remote.syms b/src/libvirt_remote.syms
> index 186d2c622..61c20d530 100644
> --- a/src/libvirt_remote.syms
> +++ b/src/libvirt_remote.syms
> @@ -52,6 +52,7 @@ virNetClientStreamMatches;
>  virNetClientStreamNew;
>  virNetClientStreamQueuePacket;
>  virNetClientStreamRaiseError;
> +virNetClientStreamRecvHole;
>  virNetClientStreamRecvPacket;
>  virNetClientStreamSendHole;
>  virNetClientStreamSendPacket;
> diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c
> index 4a3d843b1..bf3922cb5 100644
> --- a/src/rpc/virnetclientstream.c
> +++ b/src/rpc/virnetclientstream.c
> @@ -583,6 +583,22 @@ virNetClientStreamSendHole(virNetClientStreamPtr st,
>  }
>  
>  
> +int virNetClientStreamRecvHole(virNetClientPtr client ATTRIBUTE_UNUSED,
> +                               virNetClientStreamPtr st,
> +                               long long *length)

This should be

int
virNetClient...

Although, yes, different than other functions here.


Reviewed-by: John Ferlan <jferlan redhat com>

John

> +{
> +    if (!st->allowSkip) {
> +        virReportError(VIR_ERR_OPERATION_INVALID, "%s",
> +                       _("Holes are not supported with this stream"));
> +        return -1;
> +    }
> +
> +    *length = st->holeLength;
> +    st->holeLength = 0;
> +    return 0;
> +}
> +
> +

[...]


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