From: Nathan Hoad Date: Fri, 26 Jul 2013 12:39:59 +0000 (-0600) Subject: Fix assert with side effects in ServerStateData::handleAdaptedHeader X-Git-Tag: SQUID_3_3_10~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1ffd036a2d749a80aad1d0e28f87f95e7f9167a;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 619b9f3b32..efb1071cd0 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -696,7 +696,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