propagate from branch 'i2p.i2p.tuna.tmp' (head 1bba286bdb7f8ba879c4db3f356676151674a201)

to branch 'i2p.i2p' (head 5698b31632398b8156a3b4cc215fed677cf205bf)
This commit is contained in:
dev
2015-04-15 16:08:29 +00:00
161 changed files with 33674 additions and 25999 deletions

View File

@@ -256,7 +256,7 @@ public class DatabaseStoreMessage extends FastI2NPMessageImpl {
StringBuilder buf = new StringBuilder();
buf.append("[DatabaseStoreMessage: ");
buf.append("\n\tExpiration: ").append(new Date(_expiration));
buf.append("\n\tUnique ID: ").append(_uniqueId);
buf.append("\n\tUnique ID: ").append(getUniqueId());
if (_replyToken != 0) {
buf.append("\n\tReply token: ").append(_replyToken);
buf.append("\n\tReply tunnel: ").append(_replyTunnel);

View File

@@ -31,6 +31,13 @@ public abstract class I2NPMessageImpl extends DataStructureImpl implements I2NPM
protected final Log _log;
protected final I2PAppContext _context;
protected long _expiration;
/**
* Warning, lazily initialized by readBytes(), writeBytes(), toByteArray(),
* getUniqueId(), and setUniqueId(); otherwise will be -1.
* Extending classes should take care when accessing this field;
* to ensure initialization, use getUniqueId() instead.
*/
protected long _uniqueId = -1;
public final static long DEFAULT_EXPIRATION_MS = 1*60*1000; // 1 minute by default
@@ -257,7 +264,7 @@ public abstract class I2NPMessageImpl extends DataStructureImpl implements I2NPM
}
/**
* The ID is set to a random value in the constructor but it can be overridden here.
* The ID is set to a random value when written but it can be overridden here.
*/
public void setUniqueId(long id) { _uniqueId = id; }

View File

@@ -234,7 +234,7 @@ public class TunnelDataMessage extends FastI2NPMessageImpl {
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("[TunnelDataMessage:");
buf.append(" MessageId: ").append(_uniqueId);
buf.append(" MessageId: ").append(getUniqueId());
buf.append(" Tunnel ID: ").append(_tunnelId);
buf.append("]");
return buf.toString();

View File

@@ -357,6 +357,8 @@ public class Router implements RouterClock.ClockShiftListener {
*/
private void startupStuff() {
// ********* Start no threads before here ********* //
_log = _context.logManager().getLog(Router.class);
//
// NOW we can start the ping file thread.
if (!SystemVersion.isAndroid())
@@ -391,8 +393,8 @@ public class Router implements RouterClock.ClockShiftListener {
_routerInfo = null;
_higherVersionSeen = false;
_log = _context.logManager().getLog(Router.class);
_log.info("New router created with config file " + _configFilename);
if (_log.shouldLog(Log.INFO))
_log.info("New router created with config file " + _configFilename);
_oomListener = new OOMListener(_context);
_shutdownHook = new ShutdownHook(_context);
@@ -1508,7 +1510,7 @@ public class Router implements RouterClock.ClockShiftListener {
* Context must be available.
* Unzip update file found in the router dir OR base dir, to the base dir
*
* If successfull, will call exit() and never return.
* If successful, will call exit() and never return.
*
* If we can't write to the base dir, complain.
* Note: _log not available here.

View File

@@ -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 = 18;
public final static long BUILD = 1;
/** for example "-test" */
public final static String EXTRA = "-rc";
public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);

View File

@@ -158,7 +158,6 @@ public class ReseedChecker {
} catch (IOException ioe) {
if (ioe.getMessage() != null)
setError(DataHelper.escapeHTML(ioe.getMessage()));
done();
throw ioe;
} finally {
done();

View File

@@ -88,6 +88,7 @@ public class Reseeder {
"https://netdb.rows.io:444/" + "," + // Only HTTPS and SU3 (v3) support
"https://i2pseed.zarrenspry.info/" + "," + // Only HTTPS and SU3 (v3) support
"https://i2p.mooo.com/netDb/" + "," +
"https://193.150.121.66/netDb/" + "," +
"https://netdb.i2p2.no/" + "," + // Only SU3 (v3) support
"https://us.reseed.i2p2.no:444/" + "," +
"https://uk.reseed.i2p2.no:444/" + "," +

View File

@@ -18,6 +18,7 @@ package org.cybergarage.util;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.Locale;
public final class FileUtil
{
@@ -72,7 +73,7 @@ public final class FileUtil
{
if (StringUtil.hasData(name) == false)
return false;
String lowerName = name.toLowerCase();
String lowerName = name.toLowerCase(Locale.US);
return lowerName.endsWith("xml");
}
}