]> git.proxmox.com Git - mirror_qemu.git/commit
chardev-socket: do not blindly reset handlers when switching GMainContext
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Feb 2019 14:33:27 +0000 (15:33 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Mar 2019 15:50:04 +0000 (16:50 +0100)
commit5b774fe5505dc7daad908f9f4b95e9e735c45c14
tree068be487b96ffe6dfb076f22a9a30120aaea5ab4
parent3a75ef6a0fe397b0d36930415be6b123750a6afe
chardev-socket: do not blindly reset handlers when switching GMainContext

If the socket is connecting or connected, tcp_chr_update_read_handler will
be called but it should not set the NetListener's callbacks again.
Otherwise, tcp_chr_accept is invoked while the socket is in connected
state and you get an assertion failure.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
chardev/char-socket.c
tests/test-char.c