Author: toad
Date: 2008-04-25 21:21:02 +0000 (Fri, 25 Apr 2008)
New Revision: 19561
Modified:
trunk/freenet/src/freenet/node/RequestHandler.java
Log:
Logging, and revert bogus change.
Modified: trunk/freenet/src/freenet/node/RequestHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestHandler.java 2008-04-25 19:04:57 UTC
(rev 19560)
+++ trunk/freenet/src/freenet/node/RequestHandler.java 2008-04-25 21:21:02 UTC
(rev 19561)
@@ -642,6 +642,7 @@
sentBytes += x;
}
node.nodeStats.requestSentBytes(key instanceof NodeSSK, x);
+ if(logMINOR) Logger.minor(this, "sentBytes("+x+") on "+this);
}
public void receivedBytes(int x) {
@@ -652,13 +653,14 @@
}
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;
- }
+ /*
+ * Do not add payload to sentBytes. sentBytes() is called with
the actual sent bytes,
+ * and we do not deduct the alreadyReportedBytes, which are
only used for accounting
+ * for the bandwidth throttle.
+ */
node.sentPayload(x);
node.nodeStats.requestSentBytes(key instanceof NodeSSK, -x);
+ if(logMINOR) Logger.minor(this, "sentPayload("+x+") on "+this);
}
public int getPriority() {