r26734 - trunk/freenet/src/freenet/node/fcp

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-11 17:20:20 +0000 (Sat, 11 Apr 2009)
New Revision: 26734

Modified:
   trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java
Log:
ARGH! Stupid bug!


Modified: trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java	2009-04-11 03:54:49 UTC (rev 26733)
+++ trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java	2009-04-11 17:20:20 UTC (rev 26734)
@@ -326,7 +326,7 @@
 			else
 				success = !requestsByIdentifier.containsKey(id);
 			if(success) {
-				if(cp != null && !persistent) {
+				if(!persistent) {
 					try {
 						cp = new ClientPut(this, message, server, null);
 					} catch (IdentifierCollisionException e) {
@@ -338,7 +338,7 @@
 						failedMessage = new ProtocolErrorMessage(ProtocolErrorMessage.FREENET_URI_PARSE_ERROR, true, null, id, message.global);
 					}
 					requestsByIdentifier.put(id, cp);
-				} else if(cp != null && message.persistenceType == ClientRequest.PERSIST_FOREVER) {
+				} else if(message.persistenceType == ClientRequest.PERSIST_FOREVER) {
 					server.core.clientContext.jobRunner.queue(new DBJob() {
 
 						public void run(ObjectContainer container, ClientContext context) {
@@ -442,7 +442,7 @@
 				success = !requestsByIdentifier.containsKey(id);
 		}
 		if(success) {
-			if(cp != null && !persistent) {
+			if(!persistent) {
 				try {
 					cp = new ClientPutDir(this, message, buckets, wasDiskPut, server, null);
 					synchronized(this) {
@@ -454,7 +454,7 @@
 					failedMessage = new ProtocolErrorMessage(ProtocolErrorMessage.FREENET_URI_PARSE_ERROR, true, null, id, message.global);
 				}
 				// FIXME register non-persistent requests in the constructors also, we already register persistent ones...
-			} else if(cp != null && message.persistenceType == ClientRequest.PERSIST_FOREVER) {
+			} else if(message.persistenceType == ClientRequest.PERSIST_FOREVER) {
 				server.core.clientContext.jobRunner.queue(new DBJob() {
 
 					public void run(ObjectContainer container, ClientContext context) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.