From: Nathan Hoad Date: Thu, 25 Jul 2013 07:21:54 +0000 (-0600) Subject: Fix assert with side effects in ServerStateData::handleAdaptedHeader X-Git-Tag: SQUID_3_5_0_1~687 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfb6dc9d0bf6aa4a2c096542c8795701c346555c;p=thirdparty%2Fsquid.git Fix assert with side effects in ServerStateData::handleAdaptedHeader setConsumerIfNotLate conditionally schedules some async calls, so the call definitely shouldn't be removed by the precompiler. --- diff --git a/src/Server.cc b/src/Server.cc index 41d4a36c32..39ed4fe0f6 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -699,7 +699,8 @@ ServerStateData::handleAdaptedHeader(HttpMsg *msg) // subscribe to receive adapted body adaptedBodySource = rep->body_pipe; // assume that ICAP does not auto-consume on failures - assert(adaptedBodySource->setConsumerIfNotLate(this)); + const bool result = adaptedBodySource->setConsumerIfNotLate(this); + assert(result); } else { // no body if (doneWithAdaptation()) // we may still be sending virgin response