* 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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20071229/be612b0f/attachment.pgp>

Reply via email to