------------------------------------------------------------ revno: 11874 revision-id: squidadm@squid-cache.org-20111120023020-kwipo4697l72f65v parent: squid3@treenet.co.nz-20111119232713-j4vjh456ppru1yrc committer: Automatic source maintenance branch nick: trunk timestamp: Sat 2011-11-19 19:30:20 -0700 message: SourceFormat Enforcement ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squidadm@squid-cache.org-20111120023020-\ # kwipo4697l72f65v # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 0f3a3f28742b10324ede8ef294f451018f6c91a4 # timestamp: 2011-11-20 02:59:13 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20111119232713-\ # j4vjh456ppru1yrc # # Begin patch === modified file 'src/Server.cc' --- src/Server.cc 2011-11-19 09:13:07 +0000 +++ src/Server.cc 2011-11-20 02:30:20 +0000 @@ -710,7 +710,7 @@ if (abortOnBadEntry("store entry aborted while kick producer callback")) return; - if(!adaptedBodySource) + if (!adaptedBodySource) return; handleMoreAdaptedBodyAvailable(); @@ -738,7 +738,7 @@ const size_t bytesWanted = entry->bytesWanted(Range(0, contentSize)); const size_t spaceAvailable = bytesWanted > 0 ? (bytesWanted + 1) : 0; - if (spaceAvailable < contentSize ) { + if (spaceAvailable < contentSize ) { // No or partial body data consuming typedef NullaryMemFunT Dialer; AsyncCall::Pointer call = asyncCall(93, 5, "ServerStateData::resumeBodyStorage", @@ -752,16 +752,16 @@ "response body at offset " << adaptedBodySource->consumedSize()); return; } - + if (spaceAvailable < contentSize ) { debugs(11, 5, HERE << "postponing storage of " << (contentSize - spaceAvailable) << " body bytes"); contentSize = spaceAvailable; } - + debugs(11,5, HERE << "storing " << contentSize << " bytes of adapted " << "response body at offset " << adaptedBodySource->consumedSize()); - + BodyPipeCheckout bpc(*adaptedBodySource); const StoreIOBuffer ioBuf(&bpc.buf, currentOffset, contentSize); currentOffset += ioBuf.length; @@ -776,8 +776,8 @@ { if (abortOnBadEntry("entry went bad while waiting for adapted body eof")) return; - - // end consumption if we consumed everything + + // end consumption if we consumed everything if (adaptedBodySource != NULL && adaptedBodySource->exhausted()) endAdaptedBodyConsumption(); // else resumeBodyStorage() will eventually consume the rest === modified file 'src/client_side_request.cc' --- src/client_side_request.cc 2011-11-18 16:53:45 +0000 +++ src/client_side_request.cc 2011-11-20 02:30:20 +0000 @@ -1683,7 +1683,7 @@ void ClientHttpRequest::resumeBodyStorage() { - if(!adaptedBodySource) + if (!adaptedBodySource) return; noteMoreBodyDataAvailable(adaptedBodySource); === modified file 'src/format/Config.h' --- src/format/Config.h 2011-11-18 07:48:25 +0000 +++ src/format/Config.h 2011-11-20 02:30:20 +0000 @@ -30,7 +30,7 @@ }; /// The set of custom formats defined in squid.conf -/// +/// class FmtConfig { public: === modified file 'src/format/Format.cc' --- src/format/Format.cc 2011-11-18 16:40:10 +0000 +++ src/format/Format.cc 2011-11-20 02:30:20 +0000 @@ -832,22 +832,22 @@ snprintf(tmp, sizeof(tmp), "SSL_ERR=%d", al->request->errDetail); out = tmp; } - } else + } else #endif - if (al->request && al->request->errDetail != ERR_DETAIL_NONE) { - if (al->request->errDetail > ERR_DETAIL_START && - al->request->errDetail < ERR_DETAIL_MAX) - out = errorDetailName(al->request->errDetail); - else { - if (al->request->errDetail >= ERR_DETAIL_EXCEPTION_START) - snprintf(tmp, sizeof(tmp), "%s=0x%X", - errorDetailName(al->request->errDetail), (uint32_t) al->request->errDetail); - else - snprintf(tmp, sizeof(tmp), "%s=%d", - errorDetailName(al->request->errDetail), al->request->errDetail); - out = tmp; + if (al->request && al->request->errDetail != ERR_DETAIL_NONE) { + if (al->request->errDetail > ERR_DETAIL_START && + al->request->errDetail < ERR_DETAIL_MAX) + out = errorDetailName(al->request->errDetail); + else { + if (al->request->errDetail >= ERR_DETAIL_EXCEPTION_START) + snprintf(tmp, sizeof(tmp), "%s=0x%X", + errorDetailName(al->request->errDetail), (uint32_t) al->request->errDetail); + else + snprintf(tmp, sizeof(tmp), "%s=%d", + errorDetailName(al->request->errDetail), al->request->errDetail); + out = tmp; + } } - } break; case LFT_SQUID_HIERARCHY: === modified file 'src/format/TokenTableEntry.h' --- src/format/TokenTableEntry.h 2011-11-18 07:48:25 +0000 +++ src/format/TokenTableEntry.h 2011-11-20 02:30:20 +0000 @@ -19,7 +19,8 @@ { /// One entry in a table of format tokens. -class TokenTableEntry { +class TokenTableEntry +{ public: /// the config file ASCII representation for this token /// just the base tag bytes, excluding any option syntax bytes === modified file 'src/forward.cc' --- src/forward.cc 2011-11-19 00:39:25 +0000 +++ src/forward.cc 2011-11-20 02:30:20 +0000 @@ -337,7 +337,7 @@ request->detailError(errorState->type, errorState->detail->errorNo()); else #endif - request->detailError(errorState->type, errorState->xerrno); + request->detailError(errorState->type, errorState->xerrno); } /** === modified file 'src/store.cc' --- src/store.cc 2011-11-18 16:53:45 +0000 +++ src/store.cc 2011-11-20 02:30:20 +0000 @@ -417,14 +417,14 @@ if (!deferredProducer) deferredProducer = producer; else - debugs(20, 5, HERE << "Deferred producer call is allready set to: " << + debugs(20, 5, HERE << "Deferred producer call is allready set to: " << *deferredProducer << ", requested call: " << *producer); } void StoreEntry::kickProducer() { - if(deferredProducer != NULL){ + if (deferredProducer != NULL) { ScheduleCallHere(deferredProducer); deferredProducer = NULL; }