Received: from eggs.gnu.org ([2001:4830:134:3::10]:55242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2brs-00025n-9f for qemu-devel@nongnu.org; Wed, 10 Jun 2015 05:00:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2brr-0004wf-8M for qemu-devel@nongnu.org; Wed, 10 Jun 2015 05:00:16 -0400 From: Fam Zheng Date: Wed, 10 Jun 2015 16:59:46 +0800 Message-Id: <1433926791-10580-5-git-send-email-famz@redhat.com> In-Reply-To: <1433926791-10580-1-git-send-email-famz@redhat.com> References: <1433926791-10580-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 4/9] slirp: Remove dead code for "PROBE_CONN" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Weil , Stefan Hajnoczi , Jan Kiszka , Paolo Bonzini It has always been compiled out. Remove it before we refactor the rest part of slirp poll. Signed-off-by: Fam Zheng --- slirp/slirp.c | 40 ---------------------------------------- slirp/slirp_config.h | 4 ---- 2 files changed, 44 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index 35f819a..25cdca6 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -578,46 +578,6 @@ void slirp_pollfds_poll(GArray *pollfds, int select_error) * a window probe to get things going again */ } - - /* - * 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); - } /* SS_ISFCONNECTING */ -#endif } /* diff --git a/slirp/slirp_config.h b/slirp/slirp_config.h index 896d802..70563ae 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 -- 2.4.2