]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2391: assertion failed: forward.cc:1209: "(fs->code == HIER_DIRECT) == !fs->_peer"
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 18 Sep 2008 10:04:44 +0000 (22:04 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 18 Sep 2008 10:04:44 +0000 (22:04 +1200)
assert was wrong.

src/forward.cc

index 46270c7c81f5881f4aefec2c1343d2e03d662091..b482b01ba8b89912599d306100f2a129c81b08ae 100644 (file)
@@ -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);