]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Only account for read ftp data in delay pools once, not twice.
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 3 Feb 2009 20:53:43 +0000 (21:53 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 3 Feb 2009 20:53:43 +0000 (21:53 +0100)
The same data was accounted for twice in the delay pools resulting in
half of the expected rate.

src/ftp.cc

index cbe509e56a25522df199590cef55e7b00f951800..d532726795d36b01d3081438739a58b0e25fcf67 100644 (file)
@@ -1301,34 +1301,18 @@ FtpStateData::dataRead(const CommIoCbParams &io)
 
     assert(io.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 (io.flag == COMM_OK && io.size > 0) {
-#if DELAY_POOLS
-        delayId.bytesIn(io.size);
-#endif
-
-    }
-
-
     if (io.flag == COMM_OK && io.size > 0) {
         debugs(9,5,HERE << "appended " << io.size << " bytes to readBuf");
         data.readBuf->appended(io.size);
 #if DELAY_POOLS
-
         DelayId delayId = entry->mem_obj->mostBytesAllowed();
         delayId.bytesIn(io.size);
 #endif
-
         IOStats.Ftp.reads++;
 
         for (j = io.size - 1, bin = 0; j; bin++)