char: remove socket_try_connect method
commit317856cac87b2aa15d03982262a436f1d3d0a2b3
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 9 Mar 2016 16:45:04 +0000 (9 16:45 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 10 Mar 2016 17:19:07 +0000 (10 17:19 +0000)
tree33d0b8af0358f6c83dbb36f487d50a736e76a849
parentf50dfe457f128632efa0a49e2b2a472e357e00f9
char: remove socket_try_connect method

The qemu_chr_open_socket_fd() method multiplexes three different
actions into one method. The socket_try_connect() method is one
of its callers, but it only ever want one specific action
performed. By inlining that action into socket_try_connect()
we see that there is not in fact any failure scenario, so there
is not even any reason for socket_try_connect to exist. Just
inline the asynchronous connection attempts directly at the
places that need them. This shortens & clarifies the code.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
qemu-char.c