From 31a60e22752d3daaa248ca10930f3cf4bc5f02e8 Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Fri, 26 Oct 2007 18:42:59 +0000 Subject: Make Slirp statistics gathering and output conditional to LOG_ENABLED Add 'info slirp' command to monitor to display statistics Disable Slirp debugging code by default git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3451 c046a42c-6fe2-441c-8c8c-71466251a162 --- slirp/tcp_subr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'slirp/tcp_subr.c') diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index 3814ec19b2..a20a0880b3 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -255,9 +255,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err) if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; (void) tcp_output(tp); - tcpstat.tcps_drops++; + STAT(tcpstat.tcps_drops++); } else - tcpstat.tcps_conndrops++; + STAT(tcpstat.tcps_conndrops++); /* if (errno == ETIMEDOUT && tp->t_softerror) * errno = tp->t_softerror; */ @@ -305,7 +305,7 @@ tcp_close(tp) sbfree(&so->so_rcv); sbfree(&so->so_snd); sofree(so); - tcpstat.tcps_closed++; + STAT(tcpstat.tcps_closed++); return ((struct tcpcb *)0); } @@ -528,7 +528,7 @@ tcp_connect(inso) */ /* soisconnecting(so); */ /* NOFDREF used instead */ - tcpstat.tcps_connattempt++; + STAT(tcpstat.tcps_connattempt++); tp->t_state = TCPS_SYN_SENT; tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; @@ -857,7 +857,7 @@ tcp_emu(so, m) /*soisfconnecting(ns);*/ - tcpstat.tcps_connattempt++; + STAT(tcpstat.tcps_connattempt++); tp->t_state = TCPS_SYN_SENT; tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; -- cgit v1.2.3