mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
slirp: Prepare for persistent socket state flags
This prepares for adding flags to socket.so_state that must not be removed during the lifetime of a socket. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
3c6a05803c
commit
f932b6ce71
5 changed files with 26 additions and 13 deletions
|
@ -495,7 +495,8 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds)
|
|||
continue;
|
||||
|
||||
/* else failed */
|
||||
so->so_state = SS_NOFDREF;
|
||||
so->so_state &= SS_PERSISTENT_MASK;
|
||||
so->so_state |= SS_NOFDREF;
|
||||
}
|
||||
/* else so->so_state &= ~SS_ISFCONNECTING; */
|
||||
|
||||
|
@ -529,7 +530,8 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds)
|
|||
continue; /* Still connecting, continue */
|
||||
|
||||
/* else failed */
|
||||
so->so_state = SS_NOFDREF;
|
||||
so->so_state &= SS_PERSISTENT_MASK;
|
||||
so->so_state |= SS_NOFDREF;
|
||||
|
||||
/* tcp_input will take care of it */
|
||||
} else {
|
||||
|
@ -540,7 +542,8 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds)
|
|||
errno == EINPROGRESS || errno == ENOTCONN)
|
||||
continue;
|
||||
/* else failed */
|
||||
so->so_state = SS_NOFDREF;
|
||||
so->so_state &= SS_PERSISTENT_MASK;
|
||||
so->so_state |= SS_NOFDREF;
|
||||
} else
|
||||
so->so_state &= ~SS_ISFCONNECTING;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue