From: rousskov <> Date: Tue, 26 Jun 2007 06:35:24 +0000 (+0000) Subject: Polish HttpStateData::readReply() layout to weed out bugs, step 4: X-Git-Tag: SQUID_3_0_PRE7~182 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a7cc03f949fc47e9faef5bad3316e68c3c90258;p=thirdparty%2Fsquid.git Polish HttpStateData::readReply() layout to weed out bugs, step 4: Polished comments and debugging messages. This change should have no runtime effect. --- diff --git a/src/http.cc b/src/http.cc index 61b57f3bce..41a3b3dcda 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.530 2007/06/26 00:24:33 rousskov Exp $ + * $Id: http.cc,v 1.531 2007/06/26 00:35:24 rousskov Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -970,10 +970,9 @@ HttpStateData::readReply (size_t len, comm_err_t flag, int xerrno) int clen; flags.do_next_read = 0; - /* - * Bail out early on COMM_ERR_CLOSING - close handlers will tidy up for us - */ + debugs(11, 5, "httpReadReply: FD " << fd << ": len " << len << "."); + // Bail out early on COMM_ERR_CLOSING - close handlers will tidy up for us if (flag == COMM_ERR_CLOSING) { debugs(11, 3, "http socket closing"); return; @@ -984,13 +983,9 @@ HttpStateData::readReply (size_t len, comm_err_t flag, int xerrno) return; } - /* prepare the read size for the next read (if any) */ - - debugs(11, 5, "httpReadReply: FD " << fd << ": len " << len << "."); - // handle I/O errors if (flag != COMM_OK || len < 0) { - debugs(50, 2, "httpReadReply: FD " << fd << ": read failure: " << xstrerror() << "."); + debugs(11, 2, "httpReadReply: FD " << fd << ": read failure: " << xstrerror() << "."); if (ignoreErrno(xerrno)) { flags.do_next_read = 1; @@ -1006,6 +1001,7 @@ HttpStateData::readReply (size_t len, comm_err_t flag, int xerrno) return; } + // update I/O stats if (len > 0) { readBuf->appended(len); reply_bytes_read += len;