------------------------------------------------------------ revno: 12601 revision-id: squid3@treenet.co.nz-20130726123959-7jnzt159jpdz4dvq parent: squid3@treenet.co.nz-20130726123840-1ii12zrzp3gy8318 author: Nathan Hoad committer: Amos Jeffries branch nick: 3.3 timestamp: Fri 2013-07-26 06:39:59 -0600 message: 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. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130726123959-7jnzt159jpdz4dvq # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 70c562c03c2881e2df675182e84aeead2d124246 # timestamp: 2013-07-26 12:43:59 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130726123840-\ # 1ii12zrzp3gy8318 # # Begin patch === modified file 'src/Server.cc' --- src/Server.cc 2012-10-04 09:14:06 +0000 +++ src/Server.cc 2013-07-26 12:39:59 +0000 @@ -696,7 +696,8 @@ // 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