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 <berra...@redhat.com> > > --- > > 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 <ebl...@redhat.com> 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 :|