Author: nextgens
Date: 2007-10-26 18:51:48 +0000 (Fri, 26 Oct 2007)
New Revision: 15593
Modified:
trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
Revert r15590
Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java 2007-10-26
18:44:59 UTC (rev 15592)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java 2007-10-26
18:51:48 UTC (rev 15593)
@@ -800,7 +800,7 @@
DiffieHellmanLightContext ctx =
findContextByExponential(_ourExponential);
if(ctx == null) {
- Logger.normal(this, "WTF? the HMAC verified but we
don't know about that exponential! (shouldn't happen often)");
+ Logger.error(this, "WTF? the HMAC verified but we don't
know about that exponential! SHOULDN'T HAPPEN!");
return;
}
BigInteger computedExponential =
ctx.getHMACKey(_hisExponential, Global.DHgroupA);
@@ -2491,11 +2491,12 @@
return ctx;
}
- private final void _fillJFKDHFIFOOffThread() {
+ private final void _fillJFKDHFIFOOffThread(final int count) {
// do it off-thread
node.executor.execute(new Runnable() {
public void run() {
- _fillJFKDHFIFO();
+ for(int i=0;i<count;i++)
+ _fillJFKDHFIFO();
}
}, "DiffieHellman exponential signing");
}
@@ -2527,7 +2528,7 @@
// Shall we replace one element of the queue ?
if((jfkDHLastGenerationTimestamp + 30000 /*30sec*/) <
now) {
jfkDHLastGenerationTimestamp = now;
- _fillJFKDHFIFOOffThread();
+ _fillJFKDHFIFOOffThread(1);
}
dhContextFIFO.addLast(result);