Author: toad
Date: 2008-03-20 16:58:12 +0000 (Thu, 20 Mar 2008)
New Revision: 18646

Modified:
   trunk/freenet/src/freenet/node/RequestHandler.java
Log:
Don't call sentPayload twice. We always use sendSSK to send the reply, and we 
always call sentPayload there.

Modified: trunk/freenet/src/freenet/node/RequestHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestHandler.java  2008-03-20 16:54:25 UTC 
(rev 18645)
+++ trunk/freenet/src/freenet/node/RequestHandler.java  2008-03-20 16:58:12 UTC 
(rev 18646)
@@ -115,9 +115,6 @@
                                // Can report both parts, because we had both a 
Handler and a Sender
                                
node.nodeStats.successfulSskFetchBytesSentAverage.report(sent);
                                
node.nodeStats.successfulSskFetchBytesReceivedAverage.report(rcvd);
-                               // If rs == null, returnLocalData() will call 
sentPayload.
-                        node.sentPayload(rs.getSSKData().length); // won't be 
sentPayload()ed by BlockTransmitter
-                        sentPayload(rs.getSSKData().length);
                        }
                } else {
                        if(logMINOR) Logger.minor(this, "Remote CHK fetch cost 
"+sent+ '/' +rcvd+" bytes ("+status+ ')');
@@ -370,6 +367,7 @@
                if(SEND_OLD_FORMAT_SSK) {
                        Message df = DMT.createFNPSSKDataFound(uid, headers, 
data);
                        source.sendAsync(df, null, 0, this);
+                       // Not throttled, so report payload here.
                        sentPayload(data.length);
                        node.sentPayload(data.length);
                }


Reply via email to