diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java
index e75f6e0b60..f059dc94e1 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java
@@ -1,6 +1,10 @@
package net.i2p.router.web;
+import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
+import net.i2p.router.Router;
+import net.i2p.router.web.ConfigServiceHandler.UpdateWrapperManagerTask;
+import net.i2p.util.Log;
/**
*
@@ -31,6 +35,15 @@ public class ConfigUpdateHandler extends FormHandler {
public static final String DEFAULT_PROXY_PORT = "4444";
protected void processForm() {
+ if ("Check for update now".equals(_action)) {
+ NewsFetcher fetcher = NewsFetcher.getInstance(I2PAppContext.getGlobalContext());
+ fetcher.fetchNews();
+ if (fetcher.updateAvailable())
+ addFormNotice("Update available, click link on left");
+ else
+ addFormNotice("No update available");
+ }
+
if ( (_newsURL != null) && (_newsURL.length() > 0) ) {
String oldURL = _context.router().getConfigSetting(PROP_NEWS_URL);
if ( (oldURL == null) || (!_newsURL.equals(oldURL)) ) {
@@ -38,6 +51,7 @@ public class ConfigUpdateHandler extends FormHandler {
addFormNotice("Updating news URL to " + _newsURL);
}
}
+
if ( (_updateURL != null) && (_updateURL.length() > 0) ) {
String oldURL = _context.router().getConfigSetting(PROP_UPDATE_URL);
if ( (oldURL == null) || (!_updateURL.equals(oldURL)) ) {
@@ -56,7 +70,7 @@ public class ConfigUpdateHandler extends FormHandler {
if ( (_proxyPort != null) && (_proxyPort.length() > 0) ) {
String oldPort = _context.router().getConfigSetting(PROP_PROXY_PORT);
- if ( (oldPort == null) || (!_proxyHost.equals(oldPort)) ) {
+ if ( (oldPort == null) || (!_proxyPort.equals(oldPort)) ) {
_context.router().setConfigSetting(PROP_PROXY_PORT, _proxyPort);
addFormNotice("Updating proxy port to " + _proxyPort);
}
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java
index 0299156a20..0d015f8245 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java
@@ -91,7 +91,7 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
return false;
}
}
- private void fetchNews() {
+ public void fetchNews() {
String newsURL = _context.getProperty(ConfigUpdateHandler.PROP_NEWS_URL, ConfigUpdateHandler.DEFAULT_NEWS_URL);
boolean shouldProxy = Boolean.valueOf(_context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY)).booleanValue();
String proxyHost = _context.getProperty(ConfigUpdateHandler.PROP_PROXY_HOST, ConfigUpdateHandler.DEFAULT_PROXY_HOST);
diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp
index f1429d7393..76b3aff0bc 100644
--- a/apps/routerconsole/jsp/configupdate.jsp
+++ b/apps/routerconsole/jsp/configupdate.jsp
@@ -27,7 +27,7 @@
if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %>
" />
-
+
News URL:
">
Refresh frequency:
@@ -36,10 +36,10 @@
">
Update policy:
- Update anonymously?
+Update through the eepProxy?
- Proxy host: " />
- Proxy port: " />
+ eepProxy host: " />
+ eepProxy port: " />
Trusted keys:
diff --git a/history.txt b/history.txt
index 56a52be88b..476f8c0c26 100644
--- a/history.txt
+++ b/history.txt
@@ -1,4 +1,9 @@
-$Id: history.txt,v 1.197 2005/04/20 15:14:17 jrandom Exp $
+$Id: history.txt,v 1.198 2005/04/24 13:42:05 jrandom Exp $
+
+2005-04-25 smeghead
+ * Added button to router console for manual update checks.
+ * Fixed bug in configupdate.jsp that caused the proxy port to be updated
+ every time the form was submitted even if it hadn't changed.
2005-04-24 jrandom
* Added a pool of PRNGs using a different synchronization technique,