return false;
const BodyProducer::Pointer &producer = job;
- BodyPipe::Pointer pipe = arg1;
- if (!pipe->stillProducing(producer)) {
- debugs(call.debugSection, call.debugLevel, HERE << producer <<
- " no longer producing for " << pipe->status());
+ BodyPipe::Pointer aPipe = arg1;
+ if (!aPipe->stillProducing(producer)) {
+ debugs(call.debugSection, call.debugLevel, producer << " no longer producing for " << aPipe->status());
return call.cancel("no longer producing");
}
return false;
const BodyConsumer::Pointer &consumer = job;
- BodyPipe::Pointer pipe = arg1;
- if (!pipe->stillConsuming(consumer)) {
- debugs(call.debugSection, call.debugLevel, HERE << consumer <<
- " no longer consuming from " << pipe->status());
+ BodyPipe::Pointer aPipe = arg1;
+ if (!aPipe->stillConsuming(consumer)) {
+ debugs(call.debugSection, call.debugLevel, consumer << " no longer consuming from " << aPipe->status());
return call.cancel("no longer consuming");
}
/* BodyProducer */
// inform the pipe that we are done and clear the Pointer
-void BodyProducer::stopProducingFor(RefCount<BodyPipe> &pipe, bool atEof)
+void BodyProducer::stopProducingFor(RefCount<BodyPipe> &p, bool atEof)
{
- debugs(91,7, HERE << this << " will not produce for " << pipe <<
- "; atEof: " << atEof);
- assert(pipe != NULL); // be strict: the caller state may depend on this
- pipe->clearProducer(atEof);
- pipe = NULL;
+ debugs(91,7, this << " will not produce for " << p << "; atEof: " << atEof);
+ assert(p != NULL); // be strict: the caller state may depend on this
+ p->clearProducer(atEof);
+ p = NULL;
}
/* BodyConsumer */
// inform the pipe that we are done and clear the Pointer
-void BodyConsumer::stopConsumingFrom(RefCount<BodyPipe> &pipe)
+void BodyConsumer::stopConsumingFrom(RefCount<BodyPipe> &p)
{
- debugs(91,7, HERE << this << " will not consume from " << pipe);
- assert(pipe != NULL); // be strict: the caller state may depend on this
- pipe->clearConsumer();
- pipe = NULL;
+ debugs(91,7, this << " will not consume from " << p);
+ assert(p != NULL); // be strict: the caller state may depend on this
+ p->clearConsumer();
+ p = NULL;
}
/* BodyPipe */
/* BodyPipeCheckout */
-BodyPipeCheckout::BodyPipeCheckout(BodyPipe &aPipe): pipe(aPipe),
+BodyPipeCheckout::BodyPipeCheckout(BodyPipe &aPipe): thePipe(aPipe),
buf(aPipe.checkOut()), offset(aPipe.consumedSize()),
checkedOutSize(buf.contentSize()), checkedIn(false)
{
// TODO: consider implementing the long-term solution discussed at
// http://www.mail-archive.com/squid-dev@squid-cache.org/msg07910.html
debugs(91,2, HERE << "Warning: cannot undo BodyPipeCheckout");
- pipe.checkIn(*this);
+ thePipe.checkIn(*this);
}
}
BodyPipeCheckout::checkIn()
{
assert(!checkedIn);
- pipe.checkIn(*this);
+ thePipe.checkIn(*this);
checkedIn = true;
}
-BodyPipeCheckout::BodyPipeCheckout(const BodyPipeCheckout &c): pipe(c.pipe),
+BodyPipeCheckout::BodyPipeCheckout(const BodyPipeCheckout &c): thePipe(c.thePipe),
buf(c.buf), offset(c.offset), checkedOutSize(c.checkedOutSize),
checkedIn(c.checkedIn)
{
virtual void noteBodyConsumerAborted(RefCount<BodyPipe> bp) = 0;
protected:
- void stopProducingFor(RefCount<BodyPipe> &pipe, bool atEof);
+ void stopProducingFor(RefCount<BodyPipe> &, bool atEof);
};
/** Interface for those who want to consume body content from others.
virtual void noteBodyProducerAborted(RefCount<BodyPipe> bp) = 0;
protected:
- void stopConsumingFrom(RefCount<BodyPipe> &pipe);
+ void stopConsumingFrom(RefCount<BodyPipe> &);
};
/** Makes raw buffer checkin/checkout interface efficient and exception-safe.
friend class BodyPipe;
public:
- BodyPipeCheckout(BodyPipe &pipe); // checks out
+ BodyPipeCheckout(BodyPipe &); // checks out
~BodyPipeCheckout(); // aborts checkout unless checkedIn
void checkIn();
public:
- BodyPipe &pipe;
+ BodyPipe &thePipe;
MemBuf &buf;
const uint64_t offset; // of current content, relative to the body start