Merge remote-tracking branch 'remotes/berrange/tags/pull-qio-2017-07-18-1' into staging

Merge I/O 2017/07/18 v1

# gpg: Signature made Tue 18 Jul 2017 11:31:53 BST
# gpg:                using RSA key 0xBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange/tags/pull-qio-2017-07-18-1:
  io: simplify qio_channel_attach_aio_context

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2017-07-19 09:11:38 +01:00
+2 -8
View File
@@ -279,15 +279,9 @@ static void qio_channel_set_aio_fd_handlers(QIOChannel *ioc)
void qio_channel_attach_aio_context(QIOChannel *ioc,
AioContext *ctx)
{
AioContext *old_ctx;
if (ioc->ctx == ctx) {
return;
}
old_ctx = ioc->ctx ? ioc->ctx : iohandler_get_aio_context();
qio_channel_set_aio_fd_handler(ioc, old_ctx, NULL, NULL, NULL);
assert(!ioc->read_coroutine);
assert(!ioc->write_coroutine);
ioc->ctx = ctx;
qio_channel_set_aio_fd_handlers(ioc);
}
void qio_channel_detach_aio_context(QIOChannel *ioc)