diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHandler.java index 3d7f4867c285738a4c0c4d582b0bec8c43db710e..fb36e8fd12abc7c7da84133bb82f662bb936d026 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHandler.java @@ -222,9 +222,10 @@ public class ConfigNetHandler extends FormHandler { updateRates(); if (_timeSyncEnabled) { + // Time sync enable, means NOT disabled _context.router().setConfigSetting(Timestamper.PROP_DISABLED, "false"); } else { - _context.router().setConfigSetting(Timestamper.PROP_DISABLED, "false"); + _context.router().setConfigSetting(Timestamper.PROP_DISABLED, "true"); } boolean saved = _context.router().saveConfig(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java index af0e44111552526651d3ec0402b4ffe16371d8b0..69d9579914b26b6583618880445a62012f39fa2c 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java @@ -51,8 +51,8 @@ public class ConfigNetHelper { } public String getEnableTimeSyncChecked() { - String enabled = _context.getProperty(Timestamper.PROP_DISABLED, "true"); - if ( (enabled == null) || (!"true".equalsIgnoreCase(enabled)) ) + String disabled = _context.getProperty(Timestamper.PROP_DISABLED, "false"); + if ( (disabled != null) && ("true".equalsIgnoreCase(disabled)) ) return ""; else return " checked "; diff --git a/core/java/src/net/i2p/time/Timestamper.java b/core/java/src/net/i2p/time/Timestamper.java index 7fdec992f165aed9d51d90f99c457347c2bba457..8dbf4e302f762ecc9bbd3534f53adbbd71c5ed99 100644 --- a/core/java/src/net/i2p/time/Timestamper.java +++ b/core/java/src/net/i2p/time/Timestamper.java @@ -180,7 +180,7 @@ public class Timestamper implements Runnable { String disabled = _context.getProperty(PROP_DISABLED); if (disabled == null) disabled = DEFAULT_DISABLED + ""; - _disabled = Boolean.getBoolean(disabled); + _disabled = Boolean.valueOf(disabled).booleanValue(); } /**