From: Peter Xu Date: Sun, 26 Mar 2023 17:25:38 +0000 (-0400) Subject: io: tls: Inherit QIO_CHANNEL_FEATURE_SHUTDOWN on server side X-Git-Tag: v7.2.2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3218890da457ee17b3b49b8c2451130ed808cb79;p=thirdparty%2Fqemu.git io: tls: Inherit QIO_CHANNEL_FEATURE_SHUTDOWN on server side TLS iochannel will inherit io_shutdown() from the master ioc, however we missed to do that on the server side. This will e.g. allow qemu_file_shutdown() to work on dest QEMU too for migration. Acked-by: Daniel P. Berrangé Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela (cherry picked from commit 86d063fa83901bc8150343ff8b03979fbea392c9) Signed-off-by: Michael Tokarev --- diff --git a/io/channel-tls.c b/io/channel-tls.c index 4ce890a5382..4ce08ccc287 100644 --- a/io/channel-tls.c +++ b/io/channel-tls.c @@ -74,6 +74,9 @@ qio_channel_tls_new_server(QIOChannel *master, ioc = QIO_CHANNEL_TLS(object_new(TYPE_QIO_CHANNEL_TLS)); ioc->master = master; + if (qio_channel_has_feature(master, QIO_CHANNEL_FEATURE_SHUTDOWN)) { + qio_channel_set_feature(QIO_CHANNEL(ioc), QIO_CHANNEL_FEATURE_SHUTDOWN); + } object_ref(OBJECT(master)); ioc->session = qcrypto_tls_session_new(