[freenet-cvs] r15595 - trunk/freenet/src/freenet/node

nextgens at freenetproject.org nextgens at freenetproject.org
Fri Oct 26 18:58:21 UTC 2007


Author: nextgens
Date: 2007-10-26 18:58:21 +0000 (Fri, 26 Oct 2007)
New Revision: 15595

Modified:
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
JFK:
	Keep the exponent we are going to prune for 30 additional seconds.

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java	2007-10-26 18:51:55 UTC (rev 15594)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java	2007-10-26 18:58:21 UTC (rev 15595)
@@ -83,6 +83,8 @@
 	
 	public final static int DH_CONTEXT_BUFFER_SIZE = 10;
 	private final LinkedList dhContextFIFO = new LinkedList();
+	/* Get a lock on dhContextFIFO before touching it! */
+	private DiffieHellmanLightContext dhContextToBePrunned = null;
 	private long jfkDHLastGenerationTimestamp = 0;
 	
 	protected static final int NONCE_SIZE = 8;
@@ -2556,6 +2558,8 @@
 					return result;
 				}
 			}
+			if((dhContextToBePrunned.myExponential).equals(result.myExponential))
+				return dhContextToBePrunned;
 		}
 		return null;
 	}
@@ -2579,6 +2583,7 @@
 					result = tmp;
 				}
 			}
+			dhContextToBePrunned = result;
 		}
 		return result;
 	}




More information about the cvs mailing list