diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java index 32b8b85af3..806d2d7149 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java @@ -567,13 +567,35 @@ public class TunnelController implements Logging { // tell i2ptunnel, who will tell the TunnelTask, who will tell the SocketManager setSessionOptions(); - if (_running && _sessions != null) { - for (I2PSession s : _sessions) { + + // we use the tunnel sessions, not _sessions, as + // _sessions will be null for delay-open tunnels - see acquire(). + // We want the current sessions. + //List sessions = _sessions; + List sessions = _tunnel.getSessions(); + if (_running && sessions != null) { + if (sessions.isEmpty()) { + if (_log.shouldLog(Log.DEBUG)) + _log.debug("Running but no sessions to update"); + } + for (I2PSession s : sessions) { // tell the router via the session if (!s.isClosed()) { + if (_log.shouldLog(Log.DEBUG)) + _log.debug("Session is open, updating: " + s); s.updateOptions(_tunnel.getClientOptions()); + } else { + if (_log.shouldLog(Log.DEBUG)) + _log.debug("Session is closed, not updating: " + s); } } + } else { + if (_log.shouldLog(Log.DEBUG)) { + if (!_running) + _log.debug("Not running, not updating sessions"); + if (sessions == null) + _log.debug("null sessions, nothing to update"); + } } } diff --git a/history.txt b/history.txt index 42de88f606..860144a1cd 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,7 @@ +2014-09-12 zzz + * i2psnark: Escape fixes + * i2ptunnel: Fix updating session options on a running delay-open client tunnel + 2014-09-09 zzz * i2psnark: Escape fixes diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 098e16d499..14408f1ed4 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 17; + public final static long BUILD = 18; /** for example "-test" */ public final static String EXTRA = "-rc";