Author: toad
Date: 2008-06-13 12:29:57 +0000 (Fri, 13 Jun 2008)
New Revision: 20295

Modified:
   branches/db4o/freenet/src/freenet/client/async/ClientContext.java
   branches/db4o/freenet/src/freenet/node/NodeARKInserter.java
Log:
In fact, this is wrong, since it's not persistent start it directly

Modified: branches/db4o/freenet/src/freenet/client/async/ClientContext.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/ClientContext.java   
2008-06-13 12:28:32 UTC (rev 20294)
+++ branches/db4o/freenet/src/freenet/client/async/ClientContext.java   
2008-06-13 12:29:57 UTC (rev 20295)
@@ -40,7 +40,8 @@
                this.backgroundBlockEncoder = core.backgroundBlockEncoder;
        }

-       public void start(final ClientPutter inserter, final boolean param) {
+       public void start(final ClientPutter inserter, final boolean param) 
throws InsertException {
+               if(inserter.persistent()) {
                jobRunner.queue(new DBJob() {

                        public void run(ObjectContainer container, 
ClientContext context) {
@@ -52,6 +53,9 @@
                        }

                }, NativeThread.NORM_PRIORITY, false);
+               } else {
+                       inserter.start(param, param, null, this);
+               }
        }

 }

Modified: branches/db4o/freenet/src/freenet/node/NodeARKInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/NodeARKInserter.java 2008-06-13 
12:28:32 UTC (rev 20294)
+++ branches/db4o/freenet/src/freenet/node/NodeARKInserter.java 2008-06-13 
12:29:57 UTC (rev 20295)
@@ -161,6 +161,8 @@
                                        
node.clientCore.requestStarters.chkPutScheduler, 
node.clientCore.requestStarters.sskPutScheduler, 
                                        
RequestStarter.INTERACTIVE_PRIORITY_CLASS, false, false, this, null, null, 
false);

+               try {
+                       
                        node.clientCore.clientContext.start(inserter, false);

                        synchronized (this) {
@@ -180,6 +182,9 @@
                                        }
                                }
                        }
+               } catch (InsertException e) {
+                       onFailure(e, inserter); 
+               }
        }

        public void onSuccess(FetchResult result, ClientGetter state) {


Reply via email to