mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
net: inet_connect(), inet_connect_opts(): add in_progress argument
It's used to indicate the special case where a valid file-descriptor is returned (ie. success) but the connection can't be completed w/o blocking. This is needed because QERR_SOCKET_CONNECT_IN_PROGRESS is not treated like an error and a future commit will drop it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
eef5ad1086
commit
02a08fef07
6 changed files with 17 additions and 9 deletions
2
ui/vnc.c
2
ui/vnc.c
|
@ -3061,7 +3061,7 @@ int vnc_display_open(DisplayState *ds, const char *display)
|
|||
if (strncmp(display, "unix:", 5) == 0)
|
||||
vs->lsock = unix_connect(display+5);
|
||||
else
|
||||
vs->lsock = inet_connect(display, true, NULL);
|
||||
vs->lsock = inet_connect(display, true, NULL, NULL);
|
||||
if (-1 == vs->lsock) {
|
||||
g_free(vs->display);
|
||||
vs->display = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue