Update of /cvsroot/freenet/freenet/src/freenet/node/states/data
In directory sc8-pr-cvs1:/tmp/cvs-serv11098/src/freenet/node/states/data
Modified Files:
SendData.java
Log Message:
6231:
Allow clients to unregister themselves from maintenance process() in RSL. This fixes
some more FCP problems.
Prevent leak of TSL.dontReregister.
Bugfixes relating to SendData sending padding.
RSL.scheduleMaintenance takes a channel, not an NIOReader.
Cache Socket and SocketChannel on ConnectionHandler. Also changes the localport codes.
Logging
Index: SendData.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/data/SendData.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -w -r1.25 -r1.26
--- SendData.java 14 Oct 2003 17:52:49 -0000 1.25
+++ SendData.java 14 Oct 2003 19:41:38 -0000 1.26
@@ -309,7 +309,8 @@
inPaddingMode = true;
int controlLength = Key.getControlLength();
long tmpLen = partSize + controlLength;
- paddingLength = Math.min(tmpLen - moved % tmpLen, length - moved) - 1;
+ paddingLength = Math.min(tmpLen - moved % tmpLen, controlLength +
+ length - moved);
if(!waitingForWriteNotify)
sendWritePadding();
@@ -323,9 +324,9 @@
paddingLength+"/"+sentPadding+" ("+this+")",
Logger.DEBUG);
if(remainingPadding <= 0) return; // we will get finished
- if(remainingPadding < (Core.blockSize - /*Key.getControlLength()*/ 1)) {
+ if(remainingPadding < (Core.blockSize/*Key.getControlLength()*/)) {
// Last chunk, yay
- stuffToSend = new byte[/*Key.getControlLength()*/ 1 +
(int)remainingPadding];
+ stuffToSend = new byte[(int)remainingPadding];
Random r = new Random(Core.randSource.nextLong());
r.nextBytes(stuffToSend); // is this necessary? it used to be 0 padded
// FIXME: assumes getControlLength() == 1
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs