Skip to content

Commit

Permalink
io: tls: Inherit QIO_CHANNEL_FEATURE_SHUTDOWN on server side
Browse files Browse the repository at this point in the history
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é <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
(cherry picked from commit 86d063f)
Signed-off-by: Michael Tokarev <[email protected]>
  • Loading branch information
xzpeter authored and Michael Tokarev committed Apr 13, 2023
1 parent dda5750 commit 3218890
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions io/channel-tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 3218890

Please sign in to comment.