Author: toad
Date: 2009-03-11 16:23:46 +0000 (Wed, 11 Mar 2009)
New Revision: 25983
Modified:
branches/db4o/freenet/src/freenet/client/async/SplitFileInserter.java
Log:
Call cb.onFailure() in cancel(), since the segments won't call it
Modified: branches/db4o/freenet/src/freenet/client/async/SplitFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileInserter.java
2009-03-11 16:21:33 UTC (rev 25982)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileInserter.java
2009-03-11 16:23:46 UTC (rev 25983)
@@ -554,6 +554,11 @@
container.activate(segments[i], 1);
segments[i].cancel(container, context);
}
+ // The segments will call segmentFinished, but it will ignore
them because finished=true.
+ // Hence we need to call the callback here, since the caller
expects us to.
+ if(persistent)
+ container.activate(cb, 1);
+ cb.onFailure(new InsertException(InsertException.CANCELLED),
this, container, context);
}
public void schedule(ObjectContainer container, ClientContext context)
throws InsertException {
@@ -598,4 +603,18 @@
container.delete(this);
}
+ public boolean objectCanUpdate(ObjectContainer container) {
+ if(logMINOR)
+ Logger.minor(this, "objectCanUpdate() on "+this, new
Exception("debug"));
+ return true;
+ }
+
+ public boolean objectCanNew(ObjectContainer container) {
+ if(finished)
+ Logger.error(this, "objectCanNew but finished on
"+this, new Exception("error"));
+ else if(logMINOR)
+ Logger.minor(this, "objectCanNew() on "+this, new
Exception("debug"));
+ return true;
+ }
+
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs