From: Amos Jeffries Date: Sat, 11 Jun 2011 13:54:29 +0000 (+1200) Subject: Audit: Hide unset FD from connection log display X-Git-Tag: take08~55^2~124^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b7a48df22952c932edaac41dd23cbe69c80e855;p=thirdparty%2Fsquid.git Audit: Hide unset FD from connection log display --- diff --git a/src/comm/Connection.h b/src/comm/Connection.h index efdac6a1cd..78ccaddcf7 100644 --- a/src/comm/Connection.h +++ b/src/comm/Connection.h @@ -175,8 +175,9 @@ MEMPROXY_CLASS_INLINE(Connection); inline std::ostream & operator << (std::ostream &os, const Comm::Connection &conn) { - os << "FD " << conn.fd << " local=" << conn.local << - " remote=" << conn.remote; + os << "local=" << conn.local << " remote=" << conn.remote; + if (fd >= 0) + os << " FD " << conn.fd; if (flags != COMM_UNSET) os << " flags=" << conn.flags; #if USE_IDENT