]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 8 Feb 2009 09:47:46 +0000 (22:47 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 8 Feb 2009 09:47:46 +0000 (22:47 +1300)
Only account for read ftp data in delay pools once, not twice.

The same data was accounted for twice in the delay pools resulting in
half of the expected rate.

src/ftp.cc

index 1cb6d3531999984813be6e60b505674ac0606374..1fc55893c0f19424e2ed2a4d9ef81b17e2105828 100644 (file)
@@ -1237,34 +1237,18 @@ FtpStateData::dataRead(int fd, char *buf, size_t len, comm_err_t errflag, int xe
 
     assert(fd == data.fd);
 
-#if DELAY_POOLS
-
-    DelayId delayId = entry->mem_obj->mostBytesAllowed();
-
-#endif
-
     if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) {
         abortTransaction("entry aborted during dataRead");
         return;
     }
 
-    if (errflag == COMM_OK && len > 0) {
-#if DELAY_POOLS
-        delayId.bytesIn(len);
-#endif
-
-    }
-
-
     if (errflag == COMM_OK && len > 0) {
         debugs(9,5,HERE << "appended " << len << " bytes to readBuf");
         data.readBuf->appended(len);
 #if DELAY_POOLS
-
         DelayId delayId = entry->mem_obj->mostBytesAllowed();
         delayId.bytesIn(len);
 #endif
-
         IOStats.Ftp.reads++;
 
         for (j = len - 1, bin = 0; j; bin++)