]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix assert with side effects in ServerStateData::handleAdaptedHeader
authorNathan Hoad <nathan@getoffmalawn.com>
Thu, 25 Jul 2013 07:21:54 +0000 (01:21 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Jul 2013 07:21:54 +0000 (01:21 -0600)
setConsumerIfNotLate conditionally schedules some async calls, so the
call definitely shouldn't be removed by the precompiler.

src/Server.cc

index 41d4a36c32bc8f9013c86148e282efcf19a90918..39ed4fe0f69b6e48f379735fdad362fb99b8d85b 100644 (file)
@@ -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