char: fix waiting for TLS and telnet connection
Since commit
d7a04fd7d5008, tcp_chr_wait_connected() was introduced,
so vhost-user could wait until a backend started successfully. In
vhost-user case, the chr socket must be plain unix, and the chr+vhost
setup happens synchronously during qemu startup.
However, with TLS and telnet socket, initial socket setup happens
asynchronously, and s->connected is not set after the socket is
accepted. In order for tcp_chr_wait_connected() to not keep accepting
new connections and proceed with the last accepted socket, it can
check for s->ioc instead.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Message-id:
20160816083332[email protected]
Signed-off-by: Peter Maydell <[email protected]>