[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] chardev-socket: do not blindly reset handlers w
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH] chardev-socket: do not blindly reset handlers when switching GMainContext |
Date: |
Wed, 20 Feb 2019 16:39:31 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Feb 20, 2019 at 04:40:16PM +0100, Paolo Bonzini wrote:
> 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.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> chardev/char-socket.c | 2 +-
> tests/test-char.c | 95
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 96 insertions(+), 1 deletion(-)
> diff --git a/tests/test-char.c b/tests/test-char.c
> index 63b4d32..f1dec89 100644
> --- a/tests/test-char.c
> +++ b/tests/test-char.c
> @@ -1346,6 +1437,10 @@ int main(int argc, char **argv)
> SOCKET_SERVER_TEST(unix, &unixaddr);
> SOCKET_CLIENT_TEST(unix, &unixaddr);
> #endif
> + g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr,
> + char_socket_server_two_clients_test);
> + g_test_add_data_func("/char/socket/server/two-clients/unix", &unixaddr,
> + char_socket_server_two_clients_test);
The use of "unixaddr" needs to be inside a "#ifndef WIN32" conditional.
If that is fixed, then consider it
Reviewed-by: Daniel P. Berrangé <address@hidden>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|