From: Peter Xu Date: Tue, 6 Mar 2018 05:33:19 +0000 (+0800) Subject: chardev: tcp: let TLS run on chardev context X-Git-Tag: v2.12.0-rc0~16^2~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05b6cc4ae2efbafad9b45a93bccfcae51d018043;p=thirdparty%2Fqemu.git chardev: tcp: let TLS run on chardev context Now qio_channel_tls_handshake() is ready to receive the context. Let socket chardev use it, then the TLS handshake of chardev will always be with the chardev's context. Signed-off-by: Peter Xu Message-Id: <20180306053320.15401-9-peterx@redhat.com> Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- diff --git a/chardev/char-socket.c b/chardev/char-socket.c index f6ad6ee4d8f..36a8fcc1942 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -751,7 +751,7 @@ static void tcp_chr_tls_init(Chardev *chr) tcp_chr_tls_handshake, chr, NULL, - NULL); + chr->gcontext); }