From: Amos Jeffries Date: Thu, 18 Sep 2008 10:04:44 +0000 (+1200) Subject: Bug 2391: assertion failed: forward.cc:1209: "(fs->code == HIER_DIRECT) == !fs->_peer" X-Git-Tag: SQUID_3_0_STABLE10~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e49cf457470f1a8314d829ba05ac9587dfa82ba2;p=thirdparty%2Fsquid.git Bug 2391: assertion failed: forward.cc:1209: "(fs->code == HIER_DIRECT) == !fs->_peer" assert was wrong. --- diff --git a/src/forward.cc b/src/forward.cc index 46270c7c81..b482b01ba8 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1205,12 +1205,9 @@ FwdState::updateHierarchyInfo() FwdServer *fs = servers; assert(fs); - // some callers use one condition, some use the other; are they the same? - assert((fs->code == HIER_DIRECT) == !fs->_peer); - const char *nextHop = NULL; - if (fs->_peer) { + if (fs->_peer) { // went to peer, log peer host name nextHop = fs->_peer->name; } else { @@ -1221,7 +1218,7 @@ FwdState::updateHierarchyInfo() nextHop = fd_table[server_fd].ipaddr; if (!Config.onoff.log_ip_on_direct || !nextHop[0]) nextHop = request->host; // domain name - } + } assert(nextHop); hierarchyNote(&request->hier, fs->code, nextHop);