forked from I2P_Developers/i2p.i2p
* Console: Fix /peers table summary alignment
* I2CP: - Don't NPE when loglevel=warn - Don't enforce property length limits when inside router JVM * I2PSnark: Log uncaught error in ThreadedStarter to router log * I2PThread: Log uncaught error to wrapper log
This commit is contained in:
@ -1863,6 +1863,14 @@ public class SnarkManager implements CompleteListener {
|
||||
private final Snark snark;
|
||||
public ThreadedStarter(Snark s) { snark = s; }
|
||||
public void run() {
|
||||
try {
|
||||
run2();
|
||||
} catch (Exception e) {
|
||||
_log.error("Error starting", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void run2() {
|
||||
if (snark != null) {
|
||||
if (snark.isStopped())
|
||||
snark.startTorrent();
|
||||
|
@ -309,11 +309,14 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
|
||||
continue;
|
||||
}
|
||||
String val = options.getProperty(key);
|
||||
if ((key.length() > 255) || (val.length() > 255)) {
|
||||
// not serializing (no limit) in router ctx
|
||||
// fixme, bytes could still be over 255 (unlikely)
|
||||
if ((!_context.isRouterContext()) &&
|
||||
(key.length() > 255 || val.length() > 255)) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn(getPrefix() + "Not passing on property ["
|
||||
_log.warn("Not passing on property ["
|
||||
+ key
|
||||
+ "] in the session configuration as the value is too long (max = 255): "
|
||||
+ "] in the session config, key or value is too long (max = 255): "
|
||||
+ val);
|
||||
} else {
|
||||
rv.setProperty(key, val);
|
||||
|
@ -92,8 +92,12 @@ public class I2PThread extends Thread {
|
||||
t.printStackTrace();
|
||||
}
|
||||
****/
|
||||
if (t instanceof OutOfMemoryError)
|
||||
if (t instanceof OutOfMemoryError) {
|
||||
fireOOM((OutOfMemoryError)t);
|
||||
} else {
|
||||
System.out.println ("Thread terminated unexpectedly: " + getName());
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
// This creates a new I2PAppContext after it was deleted
|
||||
// in Router.finalShutdown() via RouterContext.killGlobalContext()
|
||||
|
@ -1,3 +1,10 @@
|
||||
2012-07-21 zzz
|
||||
* I2CP:
|
||||
- Don't NPE when loglevel=warn
|
||||
- Don't enforce property length limits when inside router JVM
|
||||
* I2PSnark: Log uncaught error in ThreadedStarter to router log
|
||||
* I2PThread: Log uncaught error to wrapper log
|
||||
|
||||
2012-07-20 zzz
|
||||
Prop from i2p.i2p.zzz.ipv6:
|
||||
* Addresses:
|
||||
|
@ -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 = 4;
|
||||
public final static long BUILD = 5;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -1173,10 +1173,9 @@ public class NTCPTransport extends TransportImpl {
|
||||
|
||||
if (!peers.isEmpty()) {
|
||||
// buf.append("<tr> <td colspan=\"11\"><hr></td></tr>\n");
|
||||
buf.append("<tr class=\"tablefooter\"><td align=\"center\"><b>")
|
||||
.append(ngettext("{0} peer", "{0} peers", peers.size()))
|
||||
.append("</b></td><td> </td><td> ");
|
||||
buf.append("</td><td align=\"center\"><b>").append(formatRate(bpsRecv/1024)).append(THINSP).append(formatRate(bpsSend/1024)).append("</b>");
|
||||
buf.append("<tr class=\"tablefooter\"><td colspan=\"4\" align=\"left\"><b>")
|
||||
.append(ngettext("{0} peer", "{0} peers", peers.size()));
|
||||
buf.append("</b></td><td align=\"center\"><b>").append(formatRate(bpsRecv/1024)).append(THINSP).append(formatRate(bpsSend/1024)).append("</b>");
|
||||
buf.append("</td><td align=\"center\"><b>").append(DataHelper.formatDuration2(totalUptime/peers.size()));
|
||||
buf.append("</b></td><td align=\"center\"><b>").append(DataHelper.formatDuration2(offsetTotal*1000/peers.size()));
|
||||
buf.append("</b></td><td align=\"center\"><b>").append(totalSend).append("</b></td><td align=\"center\"><b>").append(totalRecv);
|
||||
|
@ -2717,7 +2717,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
|
||||
if (numPeers > 0) {
|
||||
// buf.append("<tr><td colspan=\"16\"><hr></td></tr>\n");
|
||||
buf.append("<tr class=\"tablefooter\"><td colspan=\"3\" align=\"left\"><b>")
|
||||
buf.append("<tr class=\"tablefooter\"><td colspan=\"4\" align=\"left\"><b>")
|
||||
.append(ngettext("{0} peer", "{0} peers", peers.size()))
|
||||
.append("</b></td>" +
|
||||
"<td align=\"center\" nowrap><b>");
|
||||
|
Reference in New Issue
Block a user