Message ID | 20181114123643.24091-11-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
Series | RFC: slirp: make it again a standalone project | expand |
On 14/11/18 13:36, Marc-André Lureau wrote: > Nobody cares for over 14y. Somebody can revert or rewrite if > interested by that. > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > slirp/slirp_config.h | 4 ---- > slirp/slirp.c | 41 ----------------------------------------- > 2 files changed, 45 deletions(-) > > diff --git a/slirp/slirp_config.h b/slirp/slirp_config.h > index c59f655207..721667e3ef 100644 > --- a/slirp/slirp_config.h > +++ b/slirp/slirp_config.h > @@ -2,10 +2,6 @@ > * User definable configuration options > */ > > -/* Define if you want the connection to be probed */ > -/* XXX Not working yet, so ignore this for now */ > -#undef PROBE_CONN > - > /* Define to 1 if you want KEEPALIVE timers */ > #define DO_KEEPALIVE 0 > > diff --git a/slirp/slirp.c b/slirp/slirp.c > index 979495e88b..2d32debf2a 100644 > --- a/slirp/slirp.c > +++ b/slirp/slirp.c > @@ -699,47 +699,6 @@ void slirp_pollfds_poll(GArray *pollfds, int select_error) > } > } > } > - > - /* > - * Probe a still-connecting, non-blocking socket > - * to check if it's still alive > - */ > -#ifdef PROBE_CONN > - if (so->so_state & SS_ISFCONNECTING) { > - ret = qemu_recv(so->s, &ret, 0, 0); > - > - if (ret < 0) { > - /* XXX */ > - if (errno == EAGAIN || errno == EWOULDBLOCK || > - errno == EINPROGRESS || errno == ENOTCONN) { > - continue; /* Still connecting, continue */ > - } > - > - /* else failed */ > - so->so_state &= SS_PERSISTENT_MASK; > - so->so_state |= SS_NOFDREF; > - > - /* tcp_input will take care of it */ > - } else { > - ret = send(so->s, &ret, 0, 0); > - if (ret < 0) { > - /* XXX */ > - if (errno == EAGAIN || errno == EWOULDBLOCK || > - errno == EINPROGRESS || errno == ENOTCONN) { > - continue; > - } > - /* else failed */ > - so->so_state &= SS_PERSISTENT_MASK; > - so->so_state |= SS_NOFDREF; > - } else { > - so->so_state &= ~SS_ISFCONNECTING; > - } > - > - } > - tcp_input((struct mbuf *)NULL, sizeof(struct ip), so, > - so->so_ffamily); > - } /* SS_ISFCONNECTING */ > -#endif > } > > /* >
On Wed, Nov 14, 2018 at 04:36:12PM +0400, Marc-André Lureau wrote: > Nobody cares for over 14y. Somebody can revert or rewrite if > interested by that. > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > slirp/slirp_config.h | 4 ---- > slirp/slirp.c | 41 ----------------------------------------- > 2 files changed, 45 deletions(-) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel
diff --git a/slirp/slirp_config.h b/slirp/slirp_config.h index c59f655207..721667e3ef 100644 --- a/slirp/slirp_config.h +++ b/slirp/slirp_config.h @@ -2,10 +2,6 @@ * User definable configuration options */ -/* Define if you want the connection to be probed */ -/* XXX Not working yet, so ignore this for now */ -#undef PROBE_CONN - /* Define to 1 if you want KEEPALIVE timers */ #define DO_KEEPALIVE 0 diff --git a/slirp/slirp.c b/slirp/slirp.c index 979495e88b..2d32debf2a 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -699,47 +699,6 @@ void slirp_pollfds_poll(GArray *pollfds, int select_error) } } } - - /* - * Probe a still-connecting, non-blocking socket - * to check if it's still alive - */ -#ifdef PROBE_CONN - if (so->so_state & SS_ISFCONNECTING) { - ret = qemu_recv(so->s, &ret, 0, 0); - - if (ret < 0) { - /* XXX */ - if (errno == EAGAIN || errno == EWOULDBLOCK || - errno == EINPROGRESS || errno == ENOTCONN) { - continue; /* Still connecting, continue */ - } - - /* else failed */ - so->so_state &= SS_PERSISTENT_MASK; - so->so_state |= SS_NOFDREF; - - /* tcp_input will take care of it */ - } else { - ret = send(so->s, &ret, 0, 0); - if (ret < 0) { - /* XXX */ - if (errno == EAGAIN || errno == EWOULDBLOCK || - errno == EINPROGRESS || errno == ENOTCONN) { - continue; - } - /* else failed */ - so->so_state &= SS_PERSISTENT_MASK; - so->so_state |= SS_NOFDREF; - } else { - so->so_state &= ~SS_ISFCONNECTING; - } - - } - tcp_input((struct mbuf *)NULL, sizeof(struct ip), so, - so->so_ffamily); - } /* SS_ISFCONNECTING */ -#endif } /*
Nobody cares for over 14y. Somebody can revert or rewrite if interested by that. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- slirp/slirp_config.h | 4 ---- slirp/slirp.c | 41 ----------------------------------------- 2 files changed, 45 deletions(-)