qemu-stable
[Top][All Lists]
Advanced

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

Re: [Qemu-stable] [PATCH 02/11] iov: handle EOF in iov_send_recv


From: Paolo Bonzini
Subject: Re: [Qemu-stable] [PATCH 02/11] iov: handle EOF in iov_send_recv
Date: Tue, 23 Jul 2013 13:28:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

Il 23/07/2013 10:30, MORITA Kazutaka ha scritto:
> Without this patch, iov_send_recv() never returns when do_send_recv()
> returns zero.
> 
> Signed-off-by: MORITA Kazutaka <address@hidden>
> ---
>  util/iov.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/util/iov.c b/util/iov.c
> index cc6e837..f705586 100644
> --- a/util/iov.c
> +++ b/util/iov.c
> @@ -202,6 +202,12 @@ ssize_t iov_send_recv(int sockfd, struct iovec *iov, 
> unsigned iov_cnt,
>              return -1;
>          }
>  
> +        if (ret == 0 && !do_send) {
> +            /* recv returns 0 when the peer has performed an orderly
> +             * shutdown. */
> +            break;
> +        }
> +
>          /* Prepare for the next iteration */
>          offset += ret;
>          total += ret;
> 

Reviewed-by: Paolo Bonzini <address@hidden>

... and should also be in 1.5.2.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]