------------------------------------------------------------ revno: 12194 revision-id: kinkie@squid-cache.org-20120702153002-5kggtc2y3bigoy62 parent: kinkie@squid-cache.org-20120702123713-swr344qxk9ab07my committer: Francesco Chemolli branch nick: trunk timestamp: Mon 2012-07-02 17:30:02 +0200 message: Small optimization in CommOpener statistic accounting. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: kinkie@squid-cache.org-20120702153002-5kggtc2y3bigoy62 # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: edb95677b3dabb04fdbb631743b7192309366283 # timestamp: 2012-07-02 15:51:38 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: kinkie@squid-cache.org-20120702123713-\ # swr344qxk9ab07my # # Begin patch === modified file 'src/comm/ConnOpener.cc' --- src/comm/ConnOpener.cc 2012-06-12 14:41:36 +0000 +++ src/comm/ConnOpener.cc 2012-07-02 15:30:02 +0000 @@ -202,8 +202,8 @@ * based on the max-conn option. We need to increment here, * even if the connection may fail. */ - if (conn_->getPeer()) - conn_->getPeer()->stats.conn_open++; + if (peer *peer=(conn_->getPeer())) + ++peer->stats.conn_open; lookupLocalAddress();