forked from I2P_Developers/i2p.i2p
Console: Handle stopping plugin ClientApps
This commit is contained in:
@ -19,6 +19,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
|
|
||||||
import net.i2p.CoreVersion;
|
import net.i2p.CoreVersion;
|
||||||
import net.i2p.I2PAppContext;
|
import net.i2p.I2PAppContext;
|
||||||
|
import net.i2p.app.ClientApp;
|
||||||
|
import net.i2p.app.ClientAppState;
|
||||||
import net.i2p.data.DataHelper;
|
import net.i2p.data.DataHelper;
|
||||||
import net.i2p.router.RouterContext;
|
import net.i2p.router.RouterContext;
|
||||||
import net.i2p.router.RouterVersion;
|
import net.i2p.router.RouterVersion;
|
||||||
@ -602,6 +604,20 @@ public class PluginStarter implements Runnable {
|
|||||||
_pendingPluginClients.put(pluginName, new ConcurrentHashSet<SimpleTimer2.TimedEvent>());
|
_pendingPluginClients.put(pluginName, new ConcurrentHashSet<SimpleTimer2.TimedEvent>());
|
||||||
|
|
||||||
for(ClientAppConfig app : apps) {
|
for(ClientAppConfig app : apps) {
|
||||||
|
// If the client is a running ClientApp that we want to stop,
|
||||||
|
// bypass all the logic below.
|
||||||
|
ClientApp ca = ctx.routerAppManager().getClientApp(app.className, LoadClientAppsJob.parseArgs(app.args));
|
||||||
|
if (ca != null && ca.getState() == ClientAppState.RUNNING) {
|
||||||
|
if (action.equals("stop")) {
|
||||||
|
try {
|
||||||
|
ca.shutdown(LoadClientAppsJob.parseArgs(app.stopargs));
|
||||||
|
} catch (Throwable t) {
|
||||||
|
throw new Exception(t);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (action.equals("start") && app.disabled)
|
if (action.equals("start") && app.disabled)
|
||||||
continue;
|
continue;
|
||||||
String argVal[];
|
String argVal[];
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
2014-03-23 str4d
|
||||||
|
* Console: Handle stopping plugin ClientApps
|
||||||
|
|
||||||
2014-03-16 zzz
|
2014-03-16 zzz
|
||||||
* SSU: Fix corruption of introducer keys
|
* SSU: Fix corruption of introducer keys
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user