Update of /cvsroot/freenet/freenet/src/freenet/message
In directory sc8-pr-cvs1:/tmp/cvs-serv5586/src/freenet/message
Modified Files:
NodeMessage.java DataSend.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: NodeMessage.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/message/NodeMessage.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- NodeMessage.java 24 Oct 2003 02:24:58 -0000 1.8
+++ NodeMessage.java 27 Oct 2003 14:45:18 -0000 1.9
@@ -101,7 +101,7 @@
throw new InvalidMessageException("Read heisenbug UniqueID: "
+ Fields.longToHex(id) + ". killed chain");
}
- Core.randSource.acceptEntropy(uniqueIdEntropy, id, 64);
+ Core.getRandSource().acceptEntropy(uniqueIdEntropy, id, 64);
fs.remove("UniqueID");
return id;
} catch (NumberFormatException e) {
Index: DataSend.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/message/DataSend.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -r1.10 -r1.11
--- DataSend.java 25 Oct 2003 19:41:02 -0000 1.10
+++ DataSend.java 27 Oct 2003 14:45:18 -0000 1.11
@@ -142,7 +142,7 @@
if(e instanceof StoreIOException) throw e;
else throw new StoreIOException(e);
}
- return new ReceiveData(n.randSource.nextLong(), this.id, vis, out, length);
+ return new ReceiveData(n.getRandSource().nextLong(), this.id, vis, out,
length);
}
/** Used to swallow a DataInsert.
@@ -153,7 +153,7 @@
Storables storables = getStorables();
if (storables == null) throw new IOException();
VerifyingInputStream vin = new VerifyingInputStream(in, length);
- (new EatData(n.randSource.nextLong(), vin, length)).schedule(n);
+ (new EatData(n.getRandSource().nextLong(), vin, length)).schedule(n);
// FIXME -- should use ControlInputStream but i haven't made
// sure it will work yet
}
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs