From: Amos Jeffries Date: Thu, 5 Jun 2014 15:13:19 +0000 (-0700) Subject: Some extra polish on rev.13442 X-Git-Tag: SQUID_3_5_0_1~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=183b70d5f95105d39943560186f06c488a3da9c5;p=thirdparty%2Fsquid.git Some extra polish on rev.13442 --- diff --git a/src/comm/Read.cc b/src/comm/Read.cc index 7e5318813d..cccccb1c98 100644 --- a/src/comm/Read.cc +++ b/src/comm/Read.cc @@ -76,15 +76,15 @@ Comm::ReadNow(CommIoCbParams ¶ms, SBuf &buf) /* Attempt a read */ ++ statCounter.syscalls.sock.reads; const SBuf::size_type sz = buf.spaceSize(); - char *theBuf = buf.rawSpace(sz); + char *inbuf = buf.rawSpace(sz); errno = 0; - const int retval = FD_READ_METHOD(params.conn->fd, theBuf, sz); + const int retval = FD_READ_METHOD(params.conn->fd, inbuf, sz); params.xerrno = errno; debugs(5, 3, params.conn << ", size " << sz << ", retval " << retval << ", errno " << params.xerrno); if (retval > 0) { // data read most common case - buf.append(theBuf, retval); + buf.append(inbuf, retval); fd_bytes(params.conn->fd, retval, FD_READ); params.flag = Comm::OK; params.size = retval; @@ -121,7 +121,8 @@ Comm::HandleRead(int fd, void *data) assert(data == COMMIO_FD_READCB(fd)); assert(ccb->active()); - // without a buffer, just call back + // Without a buffer, just call back. + // The callee may ReadMore() to get the data. if (!ccb->buf) { ccb->finish(Comm::OK, 0); return;