Author: toad
Date: 2008-04-25 18:44:50 +0000 (Fri, 25 Apr 2008)
New Revision: 19559
Modified:
trunk/freenet/src/freenet/node/RequestHandler.java
Log:
SSK request sent bytes didn't count payload.
The payload should be excluded from the total request overhead counter, but NOT
from the how-many-bytes-did-this-request-use figure for output bandwidth
liability.
Modified: trunk/freenet/src/freenet/node/RequestHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestHandler.java 2008-04-25 17:40:41 UTC
(rev 19558)
+++ trunk/freenet/src/freenet/node/RequestHandler.java 2008-04-25 18:44:50 UTC
(rev 19559)
@@ -645,6 +645,11 @@
}
public void sentPayload(int x) {
+ // Count it towards the cost of this request for purposes of
output bandwidth liability.
+ // But DO NOT count it towards the request overhead total.
+ synchronized(bytesSync) {
+ sentBytes += x;
+ }
node.sentPayload(x);
node.nodeStats.requestSentBytes(key instanceof NodeSSK, -x);
}