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. Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature