[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] io: fix setting of QIO_CHANNEL_FEATURE_FD_P
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections |
Date: |
Tue, 22 Dec 2015 11:14:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 12/21/2015 09:23 AM, Daniel P. Berrange wrote:
> The QIO_CHANNEL_FEATURE_FD_PASS feature flag is set in the
> qio_channel_socket_set_fd() method, however, this only deals
> with client side connections.
>
> To ensure server side connections also have the feature flag
> set, we must set it in qio_channel_socket_accept() too.
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> io/channel-socket.c | 10 ++++++++--
> tests/test-io-channel-socket.c | 29 +++++++++++++++++++++++++----
> 2 files changed, 33 insertions(+), 6 deletions(-)
>
> diff --git a/io/channel-socket.c b/io/channel-socket.c
> index 90b3c73..eed2ff5 100644
> --- a/io/channel-socket.c
> +++ b/io/channel-socket.c
> @@ -352,13 +352,19 @@ qio_channel_socket_accept(QIOChannelSocket *ioc,
> goto error;
> }
>
> - if (getsockname(cioc->fd, (struct sockaddr *)&ioc->localAddr,
> - &ioc->localAddrLen) < 0) {
> + if (getsockname(cioc->fd, (struct sockaddr *)&cioc->localAddr,
> + &cioc->localAddrLen) < 0) {
Looks like a typo fix while at it.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature