From: Amos Jeffries Date: Thu, 18 Sep 2008 09:46:56 +0000 (+1200) Subject: Bug 2391: assertion failed: forward.cc:1209: "(fs->code == HIER_DIRECT) == !fs->_peer" X-Git-Tag: SQUID_3_1_0_1~49^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc029c2f043e08d3b16ecdb9f91740f0d21953eb;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 70efc25a88..fd923aba65 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1224,12 +1224,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 { @@ -1240,7 +1237,7 @@ FwdState::updateHierarchyInfo() nextHop = fd_table[server_fd].ipaddr; if (!Config.onoff.log_ip_on_direct || !nextHop[0]) nextHop = request->GetHost(); // domain name - } + } assert(nextHop); hierarchyNote(&request->hier, fs->code, nextHop);