------------------------------------------------------------ revno: 13446 revision-id: squid3@treenet.co.nz-20140605151319-djoy3o3t1cf4ctnt parent: squid3@treenet.co.nz-20140605145758-w2o5nmwf53dnz0hc committer: Amos Jeffries branch nick: trunk timestamp: Thu 2014-06-05 08:13:19 -0700 message: Some extra polish on rev.13442 ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140605151319-djoy3o3t1cf4ctnt # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 0a843569b7bb02e46d3c5419b36217ff3f1aeeda # timestamp: 2014-06-05 15:53:54 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140605145758-\ # w2o5nmwf53dnz0hc # # Begin patch === modified file 'src/comm/Read.cc' --- src/comm/Read.cc 2014-06-05 14:57:58 +0000 +++ src/comm/Read.cc 2014-06-05 15:13:19 +0000 @@ -76,15 +76,15 @@ /* 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 @@ 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;