Changeset f912b01


Ignore:
Timestamp:
May 7, 2014 2:36:41 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5b2766d
Parents:
b0db4e4
Message:

Fix console getting disabled when saving client config (ticket #1260)
Router: Add warning at startup if console is disabled

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java

    rb0db4e4 rf912b01  
    184184            ClientAppConfig ca = clients.get(cur);
    185185            Object val = _settings.get(cur + ".enabled");
    186             if (! ("webConsole".equals(ca.clientName) || "Web console".equals(ca.clientName)))
     186            if (! (RouterConsoleRunner.class.getName().equals(ca.className)))
    187187                ca.disabled = val == null;
    188188            // edit of an existing entry
  • router/java/src/net/i2p/router/startup/LoadClientAppsJob.java

    rb0db4e4 rf912b01  
    3939        List<ClientAppConfig> apps = ClientAppConfig.getClientApps(getContext());
    4040        if (apps.isEmpty()) {
    41             _log.error("Warning - No client apps or router console configured - we are just a router");
     41            _log.logAlways(Log.WARN, "Warning - No client apps or router console configured - we are just a router");
    4242            System.err.println("Warning - No client apps or router console configured - we are just a router");
    4343            return;
     
    4545        for(int i = 0; i < apps.size(); i++) {
    4646            ClientAppConfig app = (ClientAppConfig) apps.get(i);
    47             if (app.disabled)
     47            if (app.disabled) {
     48                if ("net.i2p.router.web.RouterConsoleRunner".equals(app.className)) {
     49                    String s = "Warning - Router console is disabled. To enable,\n edit the file " +
     50                               ClientAppConfig.configFile(getContext()) +
     51                               ",\n change the line \"clientApp." + i + ".startOnLoad=false\"" +
     52                               " to \"clientApp." + i + ".startOnLoad=true\",\n and restart.";
     53                    _log.logAlways(Log.WARN, s);
     54                    System.err.println(s);
     55                }
    4856                continue;
     57            }
    4958            String argVal[] = parseArgs(app.args);
    5059            if (app.delay <= 0) {
Note: See TracChangeset for help on using the changeset viewer.