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;
|
private final Snark snark;
|
||||||
public ThreadedStarter(Snark s) { snark = s; }
|
public ThreadedStarter(Snark s) { snark = s; }
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
|
run2();
|
||||||
|
} catch (Exception e) {
|
||||||
|
_log.error("Error starting", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void run2() {
|
||||||
if (snark != null) {
|
if (snark != null) {
|
||||||
if (snark.isStopped())
|
if (snark.isStopped())
|
||||||
snark.startTorrent();
|
snark.startTorrent();
|
||||||
|
@ -309,11 +309,14 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String val = options.getProperty(key);
|
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))
|
if (_log.shouldLog(Log.WARN))
|
||||||
_log.warn(getPrefix() + "Not passing on property ["
|
_log.warn("Not passing on property ["
|
||||||
+ key
|
+ 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);
|
+ val);
|
||||||
} else {
|
} else {
|
||||||
rv.setProperty(key, val);
|
rv.setProperty(key, val);
|
||||||
|
@ -92,8 +92,12 @@ public class I2PThread extends Thread {
|
|||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
****/
|
****/
|
||||||
if (t instanceof OutOfMemoryError)
|
if (t instanceof OutOfMemoryError) {
|
||||||
fireOOM((OutOfMemoryError)t);
|
fireOOM((OutOfMemoryError)t);
|
||||||
|
} else {
|
||||||
|
System.out.println ("Thread terminated unexpectedly: " + getName());
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// This creates a new I2PAppContext after it was deleted
|
// This creates a new I2PAppContext after it was deleted
|
||||||
// in Router.finalShutdown() via RouterContext.killGlobalContext()
|
// 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
|
2012-07-20 zzz
|
||||||
Prop from i2p.i2p.zzz.ipv6:
|
Prop from i2p.i2p.zzz.ipv6:
|
||||||
* Addresses:
|
* Addresses:
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 4;
|
public final static long BUILD = 5;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
@ -1173,10 +1173,9 @@ public class NTCPTransport extends TransportImpl {
|
|||||||
|
|
||||||
if (!peers.isEmpty()) {
|
if (!peers.isEmpty()) {
|
||||||
// buf.append("<tr> <td colspan=\"11\"><hr></td></tr>\n");
|
// buf.append("<tr> <td colspan=\"11\"><hr></td></tr>\n");
|
||||||
buf.append("<tr class=\"tablefooter\"><td align=\"center\"><b>")
|
buf.append("<tr class=\"tablefooter\"><td colspan=\"4\" align=\"left\"><b>")
|
||||||
.append(ngettext("{0} peer", "{0} peers", peers.size()))
|
.append(ngettext("{0} peer", "{0} peers", peers.size()));
|
||||||
.append("</b></td><td> </td><td> ");
|
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(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("</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(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);
|
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) {
|
if (numPeers > 0) {
|
||||||
// buf.append("<tr><td colspan=\"16\"><hr></td></tr>\n");
|
// 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(ngettext("{0} peer", "{0} peers", peers.size()))
|
||||||
.append("</b></td>" +
|
.append("</b></td>" +
|
||||||
"<td align=\"center\" nowrap><b>");
|
"<td align=\"center\" nowrap><b>");
|
||||||
|
Reference in New Issue
Block a user