Update of /cvsroot/freenet/freenet/src/freenet/node/states/data
In directory sc8-pr-cvs1:/tmp/cvs-serv5586/src/freenet/node/states/data

Modified Files:
        SendData.java 
Log Message:
Work around problem with ThrottleAsyncEntropyYarrow/Yarrow initialization order.
Made randSource in Core private and started exposing it though a getter instead of 
directly.

Index: SendData.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/data/SendData.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -r1.29 -r1.30
--- SendData.java       25 Oct 2003 09:48:57 -0000      1.29
+++ SendData.java       27 Oct 2003 14:45:17 -0000      1.30
@@ -334,7 +334,7 @@
        if(remainingPadding < (Core.blockSize/*Key.getControlLength()*/)) {
            // Last chunk, yay
            stuffToSend = new byte[(int)remainingPadding];
-           Random r = new Random(Core.randSource.nextLong());
+           Random r = new Random(Core.getRandSource().nextLong());
            r.nextBytes(stuffToSend); // is this necessary? it used to be 0 padded
            // FIXME: assumes getControlLength() == 1
            stuffToSend[stuffToSend.length-1] = (byte)
@@ -344,7 +344,7 @@
        } else {
            // Just another chunk
            stuffToSend = new byte[Core.blockSize];
-           Random r = new Random(Core.randSource.nextLong());
+           Random r = new Random(Core.getRandSource().nextLong());
            r.nextBytes(stuffToSend); // is this necessary? it used to be 0 padded
            lastPacketLength = Core.blockSize;
        }

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to