Date: Sun, 14 Jun 2009 00:21:24 GMT From: Gabor Pali <pgj@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 164311 for review Message-ID: <200906140021.n5E0LOJv098427@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=164311 Change 164311 by pgj@petymeg-current on 2009/06/14 00:21:14 Fix a small bug Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat.c#27 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat.c#27 (text+ko) ==== @@ -673,30 +673,32 @@ extract_inet_address(NETSTAT_ADDRTYPE_INET_LOCAL, stp->st_name, &inp->inp_laddr, inp->inp_lport, inp->inp_vflag & INP_ANONPORT); + stp->st_addrcnt += 1; } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { stp->st_address[stp->st_addrcnt] = extract_inet6_address(NETSTAT_ADDRTYPE_INET6_LOCAL, stp->st_name, &inp->in6p_laddr, inp->inp_lport); + stp->st_addrcnt += 1; } #endif - stp->st_addrcnt += 1; /* foreign address */ - if (inp->inp_vflag & INP_IPV6) { + if (inp->inp_vflag & INP_IPV4) { stp->st_address[stp->st_addrcnt] = extract_inet_address(NETSTAT_ADDRTYPE_INET_FOREIGN, stp->st_name, &inp->inp_faddr, inp->inp_fport, inp->inp_vflag & INP_ANONPORT); + stp->st_addrcnt += 1; } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { stp->st_address[stp->st_addrcnt] = extract_inet6_address(NETSTAT_ADDRTYPE_INET6_FOREIGN, stp->st_name, &inp->in6p_faddr, inp->inp_fport); + stp->st_addrcnt += 1; } #endif - stp->st_addrcnt += 1; } struct addr_type *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906140021.n5E0LOJv098427>