diff options
author | Peter Xu <peterx@redhat.com> | 2023-03-26 13:25:38 -0400 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-04-12 21:19:05 +0200 |
commit | 86d063fa83901bc8150343ff8b03979fbea392c9 (patch) | |
tree | c4f8ceaca892fada2fc06023698bd36ad1f60e2a /io | |
parent | abb02ce0e76a8e00026699a863ab2d11d88f56d4 (diff) |
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é <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'io')
-rw-r--r-- | io/channel-tls.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/io/channel-tls.c b/io/channel-tls.c index 5a7a3d48d6..9805dd0a3f 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( |