diff --git a/core/java/src/net/i2p/client/I2PClient.java b/core/java/src/net/i2p/client/I2PClient.java index 941549d53..adc03bb27 100644 --- a/core/java/src/net/i2p/client/I2PClient.java +++ b/core/java/src/net/i2p/client/I2PClient.java @@ -45,7 +45,7 @@ public interface I2PClient { * the router how to handle the new session, and to configure the end to end * encryption. * @param destKeyStream location from which to read the Destination, PrivateKey, and SigningPrivateKey from - * @param options set of options to configure the router with + * @param options set of options to configure the router with, if null will use System properties * @return new session allowing a Destination to recieve all of its messages and send messages to any other Destination. */ public I2PSession createSession(InputStream destKeyStream, Properties options) throws I2PSessionException; diff --git a/core/java/src/net/i2p/client/I2PClientImpl.java b/core/java/src/net/i2p/client/I2PClientImpl.java index 5b1b44867..d0147f0d7 100644 --- a/core/java/src/net/i2p/client/I2PClientImpl.java +++ b/core/java/src/net/i2p/client/I2PClientImpl.java @@ -67,14 +67,14 @@ class I2PClientImpl implements I2PClient { /** * Create a new session (though do not connect it yet) - * + * @param options set of options to configure the router with, if null will use System properties */ public I2PSession createSession(InputStream destKeyStream, Properties options) throws I2PSessionException { return createSession(I2PAppContext.getGlobalContext(), destKeyStream, options); } /** * Create a new session (though do not connect it yet) - * + * @param options set of options to configure the router with, if null will use System properties */ public I2PSession createSession(I2PAppContext context, InputStream destKeyStream, Properties options) throws I2PSessionException { return new I2PSessionMuxedImpl(context, destKeyStream, options); // thread safe and muxed diff --git a/core/java/src/net/i2p/client/I2PSessionImpl.java b/core/java/src/net/i2p/client/I2PSessionImpl.java index 285aaa780..8e62fb28a 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl.java @@ -137,6 +137,7 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa * Create a new session, reading the Destination, PrivateKey, and SigningPrivateKey * from the destKeyStream, and using the specified options to connect to the router * + * @param options set of options to configure the router with, if null will use System properties * @throws I2PSessionException if there is a problem loading the private keys or */ public I2PSessionImpl(I2PAppContext context, InputStream destKeyStream, Properties options) throws I2PSessionException { @@ -531,6 +532,7 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa /** * Retrieve the configuration options + * @return non-null, if insantiated with null options, this will be the System properties. */ Properties getOptions() { return _options; } diff --git a/core/java/src/net/i2p/client/I2PSessionImpl2.java b/core/java/src/net/i2p/client/I2PSessionImpl2.java index 62b0d3d08..f0000b68c 100644 --- a/core/java/src/net/i2p/client/I2PSessionImpl2.java +++ b/core/java/src/net/i2p/client/I2PSessionImpl2.java @@ -49,6 +49,7 @@ class I2PSessionImpl2 extends I2PSessionImpl { * Create a new session, reading the Destination, PrivateKey, and SigningPrivateKey * from the destKeyStream, and using the specified options to connect to the router * + * @param options set of options to configure the router with, if null will use System properties * @throws I2PSessionException if there is a problem loading the private keys or */ public I2PSessionImpl2(I2PAppContext ctx, InputStream destKeyStream, Properties options) throws I2PSessionException { @@ -56,7 +57,7 @@ class I2PSessionImpl2 extends I2PSessionImpl { _log = ctx.logManager().getLog(I2PSessionImpl2.class); _sendingStates = new HashSet(32); // default is BestEffort - _noEffort = "none".equalsIgnoreCase(options.getProperty(I2PClient.PROP_RELIABILITY)); + _noEffort = "none".equalsIgnoreCase(getOptions().getProperty(I2PClient.PROP_RELIABILITY)); ctx.statManager().createRateStat("i2cp.sendBestEffortTotalTime", "how long to do the full sendBestEffort call?", "i2cp", new long[] { 10*60*1000 } ); //ctx.statManager().createRateStat("i2cp.sendBestEffortStage0", "first part of sendBestEffort?", "i2cp", new long[] { 10*60*1000 } ); diff --git a/core/java/src/net/i2p/client/I2PSessionMuxedImpl.java b/core/java/src/net/i2p/client/I2PSessionMuxedImpl.java index c0533b1ff..837bc2dbc 100644 --- a/core/java/src/net/i2p/client/I2PSessionMuxedImpl.java +++ b/core/java/src/net/i2p/client/I2PSessionMuxedImpl.java @@ -67,6 +67,9 @@ import net.i2p.util.SimpleScheduler; class I2PSessionMuxedImpl extends I2PSessionImpl2 implements I2PSession { private I2PSessionDemultiplexer _demultiplexer; + /* + * @param options set of options to configure the router with, if null will use System properties + */ public I2PSessionMuxedImpl(I2PAppContext ctx, InputStream destKeyStream, Properties options) throws I2PSessionException { super(ctx, destKeyStream, options); // also stored in _sessionListener but we keep it in _demultipexer diff --git a/history.txt b/history.txt index cb73e854e..e06ca0cf3 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,6 @@ +2010-11-08 zzz + * I2CP: Fix NPE caused by null session options (seen in i2pbote) + 2010-11-06 HungryHobo * New Ant target: debianrepo * Rename debian target to debian-binary diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 7ca1a3ec2..46b0184db 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,10 +18,10 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 10; + public final static long BUILD = 11; /** for example "-test" */ - public final static String EXTRA = ""; + public final static String EXTRA = "-rc"; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public static void main(String args[]) { System.out.println("I2P Router version: " + FULL_VERSION);