* 2005-08-21 0.6.0.3 released

2005-08-21  jrandom
    * If we already have an established SSU session with the Charlie helping
      test us, cancel the test with the status of "unknown".
This commit is contained in:
jrandom
2005-08-21 18:39:05 +00:00
committed by zzz
parent ea41a90eae
commit 8f2a5b403c
6 changed files with 29 additions and 7 deletions

View File

@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.215 $ $Date: 2005/08/12 18:54:47 $";
public final static String VERSION = "0.6.0.2";
public final static long BUILD = 3;
public final static String ID = "$Revision: 1.216 $ $Date: 2005/08/17 15:05:03 $";
public final static String VERSION = "0.6.0.3";
public final static long BUILD = 0;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@@ -127,6 +127,7 @@ public class StatisticsManager implements Service {
includeRate("udp.statusDifferent", stats, new long[] { 20*60*1000 });
includeRate("udp.statusReject", stats, new long[] { 20*60*1000 });
includeRate("udp.statusUnknown", stats, new long[] { 20*60*1000 });
includeRate("udp.statusKnownharlie", stats, new long[] { 1*60*1000, 10*60*1000 });
includeRate("udp.addressUpdated", stats, new long[] { 1*60*1000 });
includeRate("udp.addressTestInsteadOfUpdate", stats, new long[] { 1*60*1000 });

View File

@@ -43,6 +43,7 @@ class PeerTestManager {
_recentTests = Collections.synchronizedList(new ArrayList(16));
_packetBuilder = new PacketBuilder(context);
_currentTest = null;
_context.statManager().createRateStat("udp.statusKnownCharlie", "How often the bob we pick passes us to a charlie we already have a session with?", "udp", new long[] { 60*1000, 20*60*1000, 60*60*1000 });
}
private static final int RESEND_TIMEOUT = 5*1000;
@@ -149,6 +150,17 @@ class PeerTestManager {
_log.error("Unable to get our IP from bob's reply: " + from + ", " + testInfo, uhe);
}
} else {
PeerState charlieSession = _transport.getPeerState(from);
if (charlieSession != null) {
if (_log.shouldLog(Log.WARN))
_log.warn("Bob chose a charlie we already have a session to, cancelling the test and rerunning (bob: "
+ _currentTest + ", charlie: " + from + ")");
_currentTest = null;
_context.statManager().addRateData("udp.statusKnownCharlie", 1, 0);
honorStatus(CommSystemFacade.STATUS_UNKNOWN);
return;
}
if (test.getReceiveCharlieTime() > 0) {
// this is our second charlie, yay!
test.setAlicePortFromCharlie(testInfo.readPort());