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

Florent Daignière nextgens at freenetproject.org
Sat Dec 29 10:53:31 UTC 2007


* robert at freenetproject.org <robert at freenetproject.org> [2007-12-29 01:37:31]:

> Author: robert
> Date: 2007-12-29 01:37:31 +0000 (Sat, 29 Dec 2007)
> New Revision: 16832
> 
> Modified:
>    trunk/freenet/src/freenet/node/FNPPacketMangler.java
> Log:
> logging & don't get MessageDigest if we don't use it
> 
> 
> Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/FNPPacketMangler.java	2007-12-28 20:25:25 UTC (rev 16831)
> +++ trunk/freenet/src/freenet/node/FNPPacketMangler.java	2007-12-29 01:37:31 UTC (rev 16832)
> @@ -2631,6 +2638,7 @@
>  					return result;
>  				}
>  			}
> +			//FIXME: Isn't this wrong? 'result.myExponential' should be exponential? And what if dhContextToBePrunned is null?
>  			if((dhContextToBePrunned.myExponential).equals(result.myExponential))
>  				return dhContextToBePrunned;
>  		}
> 

Should be if((dhContextToBePrunned != null) && ((dhContextToBePrunned.myExponential).equals(myExponential))), yes...

The NPE didn't occur because we are initializing the DH-precalc thread
way before we start receiving packets but arguably checking whether it's
null or not makes sense...

Nice catch for result.myExponential against myExponential :)

NextGen$
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://emu.freenetproject.org/pipermail/cvs/attachments/20071229/be612b0f/attachment.pgp 


More information about the cvs mailing list