From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBgyi-0008Nt-O0 for qemu-devel@nongnu.org; Wed, 23 Dec 2015 05:49:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBgye-00082l-VC for qemu-devel@nongnu.org; Wed, 23 Dec 2015 05:49:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBgye-00082h-QG for qemu-devel@nongnu.org; Wed, 23 Dec 2015 05:49:04 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6BC148F4F1 for ; Wed, 23 Dec 2015 10:49:04 +0000 (UTC) Date: Wed, 23 Dec 2015 10:49:00 +0000 From: "Daniel P. Berrange" Message-ID: <20151223104900.GC20028@redhat.com> References: <1450715016-18230-1-git-send-email-berrange@redhat.com> <1450715016-18230-2-git-send-email-berrange@redhat.com> <56799311.5040508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56799311.5040508@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org On Tue, Dec 22, 2015 at 11:14:41AM -0700, Eric Blake wrote: > 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 > > --- > > 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. Yes, the latter fix exposed the need for the former fix. I'll mention this in the commit message too > Reviewed-by: Eric Blake Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|