Re: [PATCH v3 22/31] Introduce virNetClientStreamRecvHole

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

 




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

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;
> +}
> +
> +

[...]

--
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]
  Powered by Linux