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

nextgens at freenetproject.org nextgens at freenetproject.org
Fri Apr 4 05:39:56 UTC 2008


Author: nextgens
Date: 2008-04-04 05:39:56 +0000 (Fri, 04 Apr 2008)
New Revision: 18971

Modified:
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
Fix a NPE which could be thrown if we don't have set pn yet.

I'm not sure when that can happen...

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java	2008-04-04 05:31:26 UTC (rev 18970)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java	2008-04-04 05:39:56 UTC (rev 18971)
@@ -1601,7 +1601,7 @@
 			}
 			Logger.minor(this, "Sending auth packet for "+(pn == null ? "null" : String.valueOf(pn.getPeer()))+" (phase="+phase+", ver="+version+", nt="+negType+") (last packet sent "+delta+") to "+replyTo+" data.length="+data.length+" to "+replyTo);
 		}
-		sendAuthPacket(output, pn.outgoingSetupCipher, pn, replyTo, false);
+		sendAuthPacket(output, (pn == null ? null : pn.outgoingSetupCipher), pn, replyTo, false);
 	}
 	
 	/**




More information about the cvs mailing list