From baae33d8fa41ad807968022913b2e10bf1d04a06 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 14 Jul 2007 22:52:12 +0000 Subject: [PATCH] use tcp_stat_curr_estab --- src/os/darwin/darwin_sigar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index c47f8ea3..e8c48bac 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -2165,7 +2165,9 @@ sigar_tcp_stat_get(sigar_t *sigar, tcpstat->passive_opens = mib.tcps_accepts; tcpstat->attempt_fails = mib.tcps_conndrops; tcpstat->estab_resets = mib.tcps_drops; - tcpstat->curr_estab = 0; /*XXX*/ + if (sigar_tcp_stat_curr_estab(sigar, tcpstat) != SIGAR_OK) { + tcpstat->curr_estab = -1; + } tcpstat->in_segs = mib.tcps_rcvtotal; tcpstat->out_segs = mib.tcps_sndtotal - mib.tcps_sndrexmitpack; tcpstat->retrans_segs = mib.tcps_sndrexmitpack;