Author: toad
Date: 2008-06-25 13:02:12 +0000 (Wed, 25 Jun 2008)
New Revision: 20674
Modified:
branches/db4o/freenet/src/freenet/node/fcp/ClientPutBase.java
Log:
Container can be null here.
Modified: branches/db4o/freenet/src/freenet/node/fcp/ClientPutBase.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/fcp/ClientPutBase.java
2008-06-25 01:59:45 UTC (rev 20673)
+++ branches/db4o/freenet/src/freenet/node/fcp/ClientPutBase.java
2008-06-25 13:02:12 UTC (rev 20674)
@@ -211,8 +211,18 @@
}
}
- public void receive(ClientEvent ce, ObjectContainer container,
ClientContext context) {
+ public void receive(final ClientEvent ce, ObjectContainer container,
ClientContext context) {
if(finished) return;
+ if(persistenceType == PERSIST_FOREVER && container == null) {
+ context.jobRunner.queue(new DBJob() {
+
+ public void run(ObjectContainer container,
ClientContext context) {
+ receive(ce, container, context);
+ }
+
+ }, NativeThread.NORM_PRIORITY, false);
+ return;
+ }
if(ce instanceof SplitfileProgressEvent) {
if((verbosity & VERBOSITY_SPLITFILE_PROGRESS) ==
VERBOSITY_SPLITFILE_PROGRESS) {
SimpleProgressMessage progress =
@@ -315,6 +325,9 @@
Logger.error(this, "WTF?
persistenceType="+persistenceType, new Exception("error"));
return;
}
+ if(persistenceType == PERSIST_FOREVER) {
+ container.activate(this, 2);
+ }
if(includePersistentRequest) {
FCPMessage msg = persistentTagMessage();
handler.queue(msg);