Author: toad Date: 2008-06-16 16:51:32 +0000 (Mon, 16 Jun 2008) New Revision: 20371
Modified: branches/db4o/freenet/src/freenet/node/fcp/WatchGlobal.java Log: WatchGlobal too Modified: branches/db4o/freenet/src/freenet/node/fcp/WatchGlobal.java =================================================================== --- branches/db4o/freenet/src/freenet/node/fcp/WatchGlobal.java 2008-06-16 16:49:08 UTC (rev 20370) +++ branches/db4o/freenet/src/freenet/node/fcp/WatchGlobal.java 2008-06-16 16:51:32 UTC (rev 20371) @@ -3,9 +3,14 @@ * http://www.gnu.org/ for further details of the GPL. */ package freenet.node.fcp; +import com.db4o.ObjectContainer; + +import freenet.client.async.ClientContext; +import freenet.client.async.DBJob; import freenet.node.Node; import freenet.support.Fields; import freenet.support.SimpleFieldSet; +import freenet.support.io.NativeThread; public class WatchGlobal extends FCPMessage { @@ -37,10 +42,17 @@ return NAME; } - public void run(FCPConnectionHandler handler, Node node) + public void run(final FCPConnectionHandler handler, Node node) throws MessageInvalidException { - handler.getRebootClient().setWatchGlobal(enabled, verbosityMask, node.clientCore.getFCPServer()); - handler.getForeverClient().setWatchGlobal(enabled, verbosityMask, node.clientCore.getFCPServer()); + handler.getRebootClient().setWatchGlobal(enabled, verbosityMask, node.clientCore.getFCPServer(), null); + handler.server.core.clientContext.jobRunner.queue(new DBJob() { + + public void run(ObjectContainer container, ClientContext context) { + handler.getForeverClient().setWatchGlobal(enabled, verbosityMask, handler.server, container); + } + + }, NativeThread.NORM_PRIORITY, false); + } }
