propagate from branch 'i2p.i2p.zzz.test' (head f92f40cceea44a063e48db07d10fd8cf7df3e348)
to branch 'i2p.i2p' (head c497aec52c49d2e03430b88d8d73148ee73e59a5)
This commit is contained in:
16
build.xml
16
build.xml
@ -18,6 +18,7 @@
|
||||
<echo message=" updaterWithJetty: tar the built i2p specific files and jetty into an i2pupdate.zip (extracts safely over existing installs)" />
|
||||
<echo message=" updaterWithJettyFixes: updater including local jetty patches" />
|
||||
<echo message=" updaterWithGeoIP: updater including GeoIP Files" />
|
||||
<echo message=" updaterWithJettyFixesAndGeoIP" />
|
||||
<echo message=" updaterSmall: updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, news.xml, or history.txt" />
|
||||
<echo message=" updaterRouter: updater with the i2p.jar and router.jar only" />
|
||||
<echo message=" distclean: clean up all derived files" />
|
||||
@ -201,7 +202,8 @@
|
||||
<fileset dir="." includes="**/*.java~" />
|
||||
</delete>
|
||||
</target>
|
||||
<target name="pkg" depends="distclean, updaterWithJettyFixes, tarball, installer" />
|
||||
<!-- one release only, then back to updaterWithJettyFixes -->
|
||||
<target name="pkg" depends="distclean, updaterWithJettyFixesAndGeoIP, tarball, installer" />
|
||||
<target name="pkgclean" depends="deletepkg-temp">
|
||||
<delete>
|
||||
<fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip" />
|
||||
@ -321,24 +323,20 @@
|
||||
<target name="deletepkg-temp">
|
||||
<delete dir="pkg-temp" />
|
||||
</target>
|
||||
<target name="prepconsoleDocs">
|
||||
<target name="prepconsoleDocs" depends="prepgeoupdate">
|
||||
<copy todir="pkg-temp/docs/" >
|
||||
<fileset dir="." includes="readme*.html" />
|
||||
<fileset dir="installer/resources/" includes="*-header.ht" />
|
||||
</copy>
|
||||
<copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
|
||||
<copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
|
||||
<copy todir="pkg-temp/docs/icons/flags" >
|
||||
<fileset dir="installer/resources/icons/flags" />
|
||||
</copy>
|
||||
</target>
|
||||
<target name="consoleDocs" depends="deletepkg-temp, prepconsoleDocs">
|
||||
<zip destfile="docs.zip" basedir="pkg-temp" whenempty="fail" />
|
||||
</target>
|
||||
<target name="updater" depends="prepupdate, preplicenses, zipit" />
|
||||
<target name="updaterWithGeoIP" depends="prepgeoupdate, preplicenses, zipit" />
|
||||
<target name="updaterWithGeoIP" depends="prepupdate, prepgeoupdate, preplicenses, zipit" />
|
||||
<target name="updaterWithJetty" depends="prepjupdate, preplicenses, zipit" />
|
||||
<target name="updaterWithJettyFixes" depends="prepjupdatefixes, preplicenses, zipit" />
|
||||
<target name="updaterWithJettyFixesAndGeoIP" depends="prepjupdatefixes, prepgeoupdate, preplicenses, zipit" />
|
||||
<target name="updaterSmall" depends="prepupdateSmall, zipit" />
|
||||
<target name="updaterRouter" depends="prepupdateRouter, zipit" />
|
||||
<target name="zipit">
|
||||
@ -376,7 +374,7 @@
|
||||
<copy file="build/i2p.jar" todir="pkg-temp/lib/" />
|
||||
<copy file="build/router.jar" todir="pkg-temp/lib/" />
|
||||
</target>
|
||||
<target name="prepgeoupdate" depends="prepupdate">
|
||||
<target name="prepgeoupdate">
|
||||
<copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
|
||||
<copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
|
||||
<copy todir="pkg-temp/docs/icons/flags" >
|
||||
|
@ -2,6 +2,7 @@ package net.i2p.time;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
@ -246,7 +247,12 @@ public class Timestamper implements Runnable {
|
||||
if ( (serverList == null) || (serverList.trim().length() <= 0) ) {
|
||||
serverList = DEFAULT_SERVER_LIST;
|
||||
String country = _context.getProperty(PROP_IP_COUNTRY);
|
||||
if (country != null) {
|
||||
if (country == null) {
|
||||
country = Locale.getDefault().getCountry();
|
||||
if (country != null)
|
||||
country = country.toLowerCase();
|
||||
}
|
||||
if (country != null && country.length() > 0) {
|
||||
_priorityServers = new ArrayList(3);
|
||||
for (int i = 0; i < 3; i++)
|
||||
_priorityServers.add(i + "." + country + ".pool.ntp.org");
|
||||
|
@ -49,8 +49,8 @@ class RouterWatchdog implements Runnable {
|
||||
}
|
||||
|
||||
private boolean shutdownOnHang() {
|
||||
// prop default true
|
||||
if (!Boolean.valueOf(_context.getProperty("watchdog.haltOnHang", "true")).booleanValue())
|
||||
// prop default false
|
||||
if (!Boolean.valueOf(_context.getProperty("watchdog.haltOnHang")).booleanValue())
|
||||
return false;
|
||||
|
||||
// Client manager starts complaining after 10 minutes, and we run every minute,
|
||||
@ -94,7 +94,7 @@ class RouterWatchdog implements Runnable {
|
||||
long used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
|
||||
_log.error("Memory: " + DataHelper.formatSize(used) + '/' + DataHelper.formatSize(max));
|
||||
if (_consecutiveErrors == 1) {
|
||||
_log.log(Log.CRIT, "Router appears hung! Will restart in 20 minutes if it doesn't fix itself");
|
||||
_log.log(Log.CRIT, "Router appears hung, or there is severe network congestion. Watchdog starts barking!");
|
||||
// This might work on linux...
|
||||
// It won't on windows, and we can't call i2prouter.bat either, it does something
|
||||
// completely different...
|
||||
|
@ -1069,8 +1069,8 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
||||
buf.append("Address(es): <i>");
|
||||
String country = _context.commSystem().getCountry(info.getIdentity().getHash());
|
||||
if(country != null) {
|
||||
buf.append(" <img alt=\"").append(country.toUpperCase()).append("\"");
|
||||
buf.append(" src=\"/flags.jsp?c=").append(country).append("\">");
|
||||
buf.append("<img alt=\"").append(country.toUpperCase()).append("\"");
|
||||
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
|
||||
}
|
||||
for (Iterator iter = info.getAddresses().iterator(); iter.hasNext(); ) {
|
||||
RouterAddress addr = (RouterAddress)iter.next();
|
||||
|
@ -106,6 +106,9 @@ public abstract class TransportImpl implements Transport {
|
||||
! ((FloodfillNetworkDatabaseFacade)_context.netDb()).floodfillEnabled())
|
||||
def = MAX_CONNECTION_FACTOR * (1 + bw - Router.CAPABILITY_BW12);
|
||||
}
|
||||
// increase limit for SSU, for now
|
||||
if (style.equals("udp"))
|
||||
def = def * 4 / 3;
|
||||
return _context.getProperty("i2np." + style + ".maxConnections", def);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,8 @@ public class EventPumper implements Runnable {
|
||||
* the time to iterate across them to check a few flags shouldn't be a problem.
|
||||
*/
|
||||
private static final long FAILSAFE_ITERATION_FREQ = 2*1000l;
|
||||
private static final long MIN_EXPIRE_IDLE_TIME = 5*60*1000l;
|
||||
/** tunnel test is every 30-60s, so this should be longer than, say, 3*45s to allow for drops */
|
||||
private static final long MIN_EXPIRE_IDLE_TIME = 3*60*1000l;
|
||||
private static final long MAX_EXPIRE_IDLE_TIME = 15*60*1000l;
|
||||
|
||||
public EventPumper(RouterContext ctx, NTCPTransport transport) {
|
||||
|
@ -458,7 +458,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
else
|
||||
out.write("<td>n/a</td>");
|
||||
if (cfg.getReceiveFrom() != null)
|
||||
out.write("<td>" + netDbLink(cfg.getReceiveFrom()) +"</td>");
|
||||
out.write("<td align=\"right\">" + netDbLink(cfg.getReceiveFrom()) +"</td>");
|
||||
else
|
||||
out.write("<td> </td>");
|
||||
if (cfg.getSendTunnel() != null)
|
||||
@ -466,7 +466,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
else
|
||||
out.write("<td> </td>");
|
||||
if (cfg.getSendTo() != null)
|
||||
out.write("<td>" + netDbLink(cfg.getSendTo()) +"</td>");
|
||||
out.write("<td align=\"right\">" + netDbLink(cfg.getSendTo()) +"</td>");
|
||||
else
|
||||
out.write("<td> </td>");
|
||||
long timeLeft = cfg.getExpiration()-_context.clock().now();
|
||||
@ -603,7 +603,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
out.write("<h2><a name=\"peers\">Tunnel Counts By Peer</a>:</h2>\n");
|
||||
out.write("<table border=\"1\"><tr><td><b>Peer</b></td><td><b>Expl. + Client</b></td><td><b>% of total</b></td><td><b>Part. from + to</b></td><td><b>% of total</b></td></tr>\n");
|
||||
for (Hash h : peerList) {
|
||||
out.write("<tr><td>");
|
||||
out.write("<tr><td align=\"right\">");
|
||||
out.write(netDbLink(h));
|
||||
out.write("<td align=\"right\">" + lc.count(h));
|
||||
out.write("<td align=\"right\">");
|
||||
|
@ -104,7 +104,7 @@ public abstract class Parser
|
||||
public Node parse(String descr) throws ParserException
|
||||
{
|
||||
try {
|
||||
StringBufferInputStream decrIn = new StringBufferInputStream(descr);
|
||||
InputStream decrIn = new ByteArrayInputStream(descr.getBytes());
|
||||
Node root = parse(decrIn);
|
||||
return root;
|
||||
} catch (Exception e) {
|
||||
|
Reference in New Issue
Block a user