From f5f02236dfb11fb3d86b951e16488489550001d4 Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 7 Apr 2010 23:21:45 +0000 Subject: [PATCH] toString() for logging --- core/java/src/net/i2p/client/I2PSessionImpl.java | 12 ++++++++++++ history.txt | 15 +++++++++++++++ router/java/src/net/i2p/router/RouterVersion.java | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/client/I2PSessionImpl.java b/core/java/src/net/i2p/client/I2PSessionImpl.java index 7fdb17d00..e4ee1c290 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl.java @@ -736,4 +736,16 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa SimpleScheduler.getInstance().addEvent(new SessionIdleTimer(_context, this, reduce, close), SessionIdleTimer.MINIMUM_TIME); } } + + @Override + public String toString() { + StringBuilder buf = new StringBuilder(32); + buf.append("Session: "); + if (_myDestination != null) + buf.append(_myDestination.calculateHash().toBase64().substring(0, 4)); + else + buf.append("[null dest]"); + buf.append(getPrefix()); + return buf.toString(); + } } diff --git a/history.txt b/history.txt index 072926767..4a6e2d8ed 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,18 @@ +2010-04-08 zzz + * Key Manager: Hopefully avoid some races at startup + http://forum.i2p/viewtopic.php?t=4424 + * OCMOSJ: + - Increase min timeout + - Logging tweaks + * Streaming: + - Detect and drop dup SYNs rather than create + a duplicate connection - will hopefully fix + "Received a syn with the wrong IDs" + - Send reset for a SYN ACK with the wrong IDs + - Don't send a reset to a null dest + - Logging tweaks + - Cleanups + 2010-04-05 zzz * Console: - Add tooltip support for plugin links diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index c10128fe6..fecba78d6 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 = 6; + public final static long BUILD = 7; /** for example "-test" */ public final static String EXTRA = "";