Updates after review:

Remove meeh.i2p as update host (ticket #1515)
Re-add 193.xxx https reseed
Fix SocketManagerFactory property handling
Restore UPnP locale fix lost in the merge
i2ptunnel finals
I2NP unique id fixes
duplicate done() in ReseedChecker
bigger langbox in CSS
reformatting
Javadocs
This commit is contained in:
zzz
2015-04-11 19:34:34 +00:00
parent 69a0324e86
commit dd265bbd54
23 changed files with 47 additions and 26 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

@ -1508,7 +1508,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,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 = 19;
public final static long BUILD = 20;
/** for example "-test" */
public final static String EXTRA = "-rc";

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");
}
}