Merge qio 2017/04/04 v1
-----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJY47kkAAoJEL6G67QVEE/fcioP/3pGqIkDy3HmZkCM67Z3SNdH x3CTOUr+GI9J2NNuRGrc92Is5/KAOWjNVs+Wn1VHeaS4VLkIZkv90IYSfZd3e/Lo gLwqoP1wFFFf5HBamlN1/oqLva68sZN14PtyL+GY7CtOlBTuj9s+M9vBXao8kaea LWbMUZP6AOvPyjgRfinRWJKZp19Ed6jAtQoDtR4+VTz9ZWo5tQHeiBpDpvK6A1jy VhXWlz6FKpE/Qd7a1NGkV9UnbqJPl5mUYeNoxmPsSI4S7x7tfI1SD1XT32G7knLc xz1+WVO/EhCI9oEcPof/auPY/M1htkoMrMRxOWzBr2sL8/5KqZtQma9wvCXu1sJG NKNJ2Lm0eiB+BB8+iuy4Il93utouyG9BoIc+bofeHfpjTKqS6yGPejYjce4J9Sqe 8z2i8c9ul03hJJYegMJ1F/4VLrUPnPhpzPeBHfqSdhpOwipoEE3yUN3JjvOU92hc h9TzQpMWav6pzHqPqL5COW+vwHa6iefB0oc3dpIbECsC+AWN37z5gmQpMpcKnp25 JgcnH9f0SeLpNEU0KOoSFWiDnN8asXTmeWhcq5N9/uuMK9dAGuU/k1apQh0Tigqr iuxhNSNIiLIkGQ9rnNe9o9ZrhpMfu4AY0fRet5TGAAHOAlfw8oZIUnJ908FUA7vo rZt9Vs6Ze5n/DOUZ37ST =dnYl -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/berrange/tags/pull-qio-2017-04-04-1' into staging Merge qio 2017/04/04 v1 # gpg: Signature made Tue 04 Apr 2017 16:17:56 BST # gpg: using RSA key 0xBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/pull-qio-2017-04-04-1: io: fix FD socket handling in DNS lookup io: fix incoming client socket initialization Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
fa902c8ca0
|
@ -331,16 +331,10 @@ qio_channel_socket_accept(QIOChannelSocket *ioc,
|
|||
{
|
||||
QIOChannelSocket *cioc;
|
||||
|
||||
cioc = QIO_CHANNEL_SOCKET(object_new(TYPE_QIO_CHANNEL_SOCKET));
|
||||
cioc->fd = -1;
|
||||
cioc = qio_channel_socket_new();
|
||||
cioc->remoteAddrLen = sizeof(ioc->remoteAddr);
|
||||
cioc->localAddrLen = sizeof(ioc->localAddr);
|
||||
|
||||
#ifdef WIN32
|
||||
QIO_CHANNEL(cioc)->event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
#endif
|
||||
|
||||
|
||||
retry:
|
||||
trace_qio_channel_socket_accept(ioc);
|
||||
cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr,
|
||||
|
|
|
@ -158,16 +158,13 @@ int qio_dns_resolver_lookup_sync(QIODNSResolver *resolver,
|
|||
|
||||
case SOCKET_ADDRESS_KIND_UNIX:
|
||||
case SOCKET_ADDRESS_KIND_VSOCK:
|
||||
case SOCKET_ADDRESS_KIND_FD:
|
||||
return qio_dns_resolver_lookup_sync_nop(resolver,
|
||||
addr,
|
||||
naddrs,
|
||||
addrs,
|
||||
errp);
|
||||
|
||||
case SOCKET_ADDRESS_KIND_FD:
|
||||
error_setg(errp, "Unsupported socket address type 'fd'");
|
||||
return -1;
|
||||
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
|
|
@ -234,6 +234,8 @@ static void test_io_channel(bool async,
|
|||
qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(!passFD ||
|
||||
qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
g_assert(qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
|
||||
test = qio_channel_test_new();
|
||||
qio_channel_test_run_threads(test, true, src, dst);
|
||||
|
@ -248,6 +250,8 @@ static void test_io_channel(bool async,
|
|||
qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(!passFD ||
|
||||
qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
g_assert(qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
|
||||
test = qio_channel_test_new();
|
||||
qio_channel_test_run_threads(test, false, src, dst);
|
||||
|
@ -262,6 +266,8 @@ static void test_io_channel(bool async,
|
|||
qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(!passFD ||
|
||||
qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
g_assert(qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
|
||||
test = qio_channel_test_new();
|
||||
qio_channel_test_run_threads(test, true, src, dst);
|
||||
|
@ -276,6 +282,8 @@ static void test_io_channel(bool async,
|
|||
qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(!passFD ||
|
||||
qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_FD_PASS));
|
||||
g_assert(qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
g_assert(qio_channel_has_feature(dst, QIO_CHANNEL_FEATURE_SHUTDOWN));
|
||||
|
||||
test = qio_channel_test_new();
|
||||
qio_channel_test_run_threads(test, false, src, dst);
|
||||
|
|
Loading…
Reference in a new issue