From 3e66ea3f569fce7e8dc63b2ce7e96cc1ace56227 Mon Sep 17 00:00:00 2001 From: jrandom Date: Sun, 13 Jun 2004 19:45:53 +0000 Subject: [PATCH] include the router's config in the property settings --- .../src/net/i2p/router/RouterContext.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/router/java/src/net/i2p/router/RouterContext.java b/router/java/src/net/i2p/router/RouterContext.java index 52bfe2dd2..5475f0535 100644 --- a/router/java/src/net/i2p/router/RouterContext.java +++ b/router/java/src/net/i2p/router/RouterContext.java @@ -218,4 +218,29 @@ public class RouterContext extends I2PAppContext { buf.append(_reliabilityCalc).append('\n'); return buf.toString(); } + + /** + * Tie in the router's config as properties, as well as whatever the + * I2PAppContext says. + * + */ + public String getProperty(String propName) { + if (_router != null) { + String val = _router.getConfigSetting(propName); + if (val != null) return val; + } + return super.getProperty(propName); + } + /** + * Tie in the router's config as properties, as well as whatever the + * I2PAppContext says. + * + */ + public String getProperty(String propName, String defaultVal) { + if (_router != null) { + String val = _router.getConfigSetting(propName); + if (val != null) return val; + } + return super.getProperty(propName, defaultVal); + } } \ No newline at end of file