}
size_t
-BodyPipe::putMoreData(const char *buf, size_t size)
+BodyPipe::putMoreData(const char *aBuffer, size_t size)
{
if (bodySizeKnown())
size = min((uint64_t)size, unproducedSize());
const size_t spaceSize = static_cast<size_t>(theBuf.potentialSpaceSize());
if ((size = min(size, spaceSize))) {
- theBuf.append(buf, size);
+ theBuf.append(aBuffer, size);
postAppend(size);
return size;
}
}
size_t
-BodyPipe::getMoreData(MemBuf &buf)
+BodyPipe::getMoreData(MemBuf &aMemBuffer)
{
if (!theBuf.hasContent())
return 0; // did not touch the possibly uninitialized buf
- if (buf.isNull())
- buf.init();
- const size_t size = min(theBuf.contentSize(), buf.potentialSpaceSize());
- buf.append(theBuf.content(), size);
+ if (aMemBuffer.isNull())
+ aMemBuffer.init();
+ const size_t size = min(theBuf.contentSize(), aMemBuffer.potentialSpaceSize());
+ aMemBuffer.append(theBuf.content(), size);
theBuf.consume(size);
postConsume(size);
return size; // cannot be zero if we called buf.init above
// a short temporary string describing buffer status for debugging
const char *BodyPipe::status() const
{
- static MemBuf buf;
- buf.reset();
+ static MemBuf outputBuffer;
+ outputBuffer.reset();
- buf.append(" [", 2);
+ outputBuffer.append(" [", 2);
- buf.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize);
+ outputBuffer.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize);
if (theBodySize >= 0)
- buf.Printf("<=%"PRId64, theBodySize);
+ outputBuffer.Printf("<=%"PRId64, theBodySize);
else
- buf.append("<=?", 3);
+ outputBuffer.append("<=?", 3);
- buf.Printf(" %d+%d", (int)theBuf.contentSize(), (int)theBuf.spaceSize());
+ outputBuffer.Printf(" %d+%d", (int)theBuf.contentSize(), (int)theBuf.spaceSize());
- buf.Printf(" pipe%p", this);
+ outputBuffer.Printf(" pipe%p", this);
if (theProducer)
- buf.Printf(" prod%p", theProducer);
+ outputBuffer.Printf(" prod%p", theProducer);
if (theConsumer)
- buf.Printf(" cons%p", theConsumer);
+ outputBuffer.Printf(" cons%p", theConsumer);
if (mustAutoConsume)
- buf.append(" A", 2);
+ outputBuffer.append(" A", 2);
if (isCheckedOut)
- buf.append(" L", 2); // Locked
+ outputBuffer.append(" L", 2); // Locked
- buf.append("]", 1);
+ outputBuffer.append("]", 1);
- buf.terminate();
+ outputBuffer.terminate();
- return buf.content();
+ return outputBuffer.content();
}
}
bool
-ConfigOptionVector::parse(char const *option, const char *value, int reconfiguring)
+ConfigOptionVector::parse(char const *option, const char *value, int isaReconfig)
{
Vector<ConfigOption *>::iterator i = options.begin();
while (i != options.end()) {
- if ((*i)->parse(option,value, reconfiguring))
+ if ((*i)->parse(option,value, isaReconfig))
return true;
++i;
void *cbdata;
int callback_valid;
void *buf;
- int fd;
+ int filedescriptor;
async_queue_entry_t *aqe;
async_queue_entry_type_t type;
/* Get the callback parameters */
freefunc = aqe->aq_e_free;
buf = aqe->aq_e_buf;
- fd = aqe->aq_e_fd;
+ filedescriptor = aqe->aq_e_fd;
type = aqe->aq_e_type;
callback_valid = cbdataReferenceValidDone(aqe->aq_e_callback_data, &cbdata);
AIODiskFile * theFile = NULL;
}
bool
-DiskdIOStrategy::optionQ1Parse(const char *name, const char *value, int reconfiguring)
+DiskdIOStrategy::optionQ1Parse(const char *name, const char *value, int isaReconfig)
{
if (strcmp(name, "Q1") != 0)
return false;
magic1 = atoi(value);
- if (!reconfiguring)
+ if (!isaReconfig)
return true;
if (old_magic1 < magic1) {
}
bool
-DiskdIOStrategy::optionQ2Parse(const char *name, const char *value, int reconfiguring)
+DiskdIOStrategy::optionQ2Parse(const char *name, const char *value, int isaReconfig)
{
if (strcmp(name, "Q2") != 0)
return false;
magic2 = atoi(value);
- if (!reconfiguring)
+ if (!isaReconfig)
return true;
if (old_magic2 < magic2) {
dlinkDelete(&ctrlp->node, &used_list);
if (ctrlp->done_handler) {
- AIOCB *callback = ctrlp->done_handler;
+ AIOCB *done_callback = ctrlp->done_handler;
void *cbdata;
ctrlp->done_handler = NULL;
if (cbdataReferenceValidDone(ctrlp->done_handler_data, &cbdata)) {
retval = 1; /* Return that we've actually done some work */
- callback(ctrlp->fd, cbdata, ctrlp->bufp,
+ done_callback(ctrlp->fd, cbdata, ctrlp->bufp,
ctrlp->result.aio_return, ctrlp->result.aio_errno);
} else {
if (ctrlp->operation == _AIO_OPEN) {
void
HttpReply::setHeaders(HttpVersion ver, http_status status, const char *reason,
- const char *ctype, int64_t clen, time_t lmt, time_t expires)
+ const char *ctype, int64_t clen, time_t lmt, time_t expiresTime)
{
HttpHeader *hdr;
httpStatusLineSet(&sline, ver, status, reason);
if (clen >= 0)
hdr->putInt64(HDR_CONTENT_LENGTH, clen);
- if (expires >= 0)
- hdr->putTime(HDR_EXPIRES, expires);
+ if (expiresTime >= 0)
+ hdr->putTime(HDR_EXPIRES, expiresTime);
if (lmt > 0) /* this used to be lmt != 0 @?@ */
hdr->putTime(HDR_LAST_MODIFIED, lmt);
content_length = clen;
- expires = expires;
+ expires = expiresTime;
last_modified = lmt;
}