2005-09-12 jrandom
* Bugfix for skewed store which could kill a UDP thread (causing complete comm failure and eventual OOM)
This commit is contained in:
@ -1,4 +1,8 @@
|
|||||||
$Id: history.txt,v 1.244 2005/09/10 22:22:52 jrandom Exp $
|
$Id: history.txt,v 1.245 2005/09/12 19:12:04 jrandom Exp $
|
||||||
|
|
||||||
|
2005-09-12 jrandom
|
||||||
|
* Bugfix for skewed store which could kill a UDP thread (causing complete
|
||||||
|
comm failure and eventual OOM)
|
||||||
|
|
||||||
2005-09-12 jrandom
|
2005-09-12 jrandom
|
||||||
* More aggressively publish updated routerInfo.
|
* More aggressively publish updated routerInfo.
|
||||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
public class RouterVersion {
|
||||||
public final static String ID = "$Revision: 1.231 $ $Date: 2005/09/10 22:22:52 $";
|
public final static String ID = "$Revision: 1.232 $ $Date: 2005/09/12 19:12:00 $";
|
||||||
public final static String VERSION = "0.6.0.5";
|
public final static String VERSION = "0.6.0.5";
|
||||||
public final static long BUILD = 6;
|
public final static long BUILD = 7;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||||
System.out.println("Router ID: " + RouterVersion.ID);
|
System.out.println("Router ID: " + RouterVersion.ID);
|
||||||
|
@ -214,9 +214,14 @@ public class TransportManager implements TransportEventListener {
|
|||||||
public void messageReceived(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash) {
|
public void messageReceived(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash) {
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("I2NPMessage received: " + message.getClass().getName(), new Exception("Where did I come from again?"));
|
_log.debug("I2NPMessage received: " + message.getClass().getName(), new Exception("Where did I come from again?"));
|
||||||
int num = _context.inNetMessagePool().add(message, fromRouter, fromRouterHash);
|
try {
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
int num = _context.inNetMessagePool().add(message, fromRouter, fromRouterHash);
|
||||||
_log.debug("Added to in pool: "+ num);
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
|
_log.debug("Added to in pool: "+ num);
|
||||||
|
} catch (IllegalArgumentException iae) {
|
||||||
|
if (_log.shouldLog(Log.WARN))
|
||||||
|
_log.warn("Error receiving message", iae);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getMostRecentErrorMessages() {
|
public List getMostRecentErrorMessages() {
|
||||||
|
@ -42,19 +42,20 @@ public class UDPAddress {
|
|||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer rv = new StringBuffer(64);
|
StringBuffer rv = new StringBuffer(64);
|
||||||
rv.append("[SSU ");
|
|
||||||
if (_host != null)
|
|
||||||
rv.append("host: ").append(_host).append(' ');
|
|
||||||
if (_port > 0)
|
|
||||||
rv.append("port: ").append(_port).append(' ');
|
|
||||||
if (_introKey != null)
|
|
||||||
rv.append("key: ").append(Base64.encode(_introKey)).append(' ');
|
|
||||||
if (_introHosts != null) {
|
if (_introHosts != null) {
|
||||||
for (int i = 0; i < _introHosts.length; i++) {
|
for (int i = 0; i < _introHosts.length; i++) {
|
||||||
rv.append("intro[" + i + "]: ").append(_introHosts[i]);
|
rv.append("ssu://");
|
||||||
rv.append(':').append(_introPorts[i]);
|
rv.append(_introTags[i]).append('@');
|
||||||
rv.append('/').append(Base64.encode(_introKeys[i])).append(' ');
|
rv.append(_introHosts[i]).append(':').append(_introPorts[i]);
|
||||||
|
//rv.append('/').append(Base64.encode(_introKeys[i]));
|
||||||
|
if (i + 1 < _introKeys.length)
|
||||||
|
rv.append(", ");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if ( (_host != null) && (_port > 0) )
|
||||||
|
rv.append("ssu://").append(_host).append(':').append(_port);//.append('/').append(Base64.encode(_introKey));
|
||||||
|
else
|
||||||
|
rv.append("ssu://autodetect.not.yet.complete:").append(_port);
|
||||||
}
|
}
|
||||||
return rv.toString();
|
return rv.toString();
|
||||||
}
|
}
|
||||||
|
@ -114,10 +114,15 @@ public class InboundMessageDistributor implements GarlicMessageReceiver.CloveRec
|
|||||||
// treat db store explicitly, since we don't want to republish (or flood)
|
// treat db store explicitly, since we don't want to republish (or flood)
|
||||||
// unnecessarily
|
// unnecessarily
|
||||||
DatabaseStoreMessage dsm = (DatabaseStoreMessage)data;
|
DatabaseStoreMessage dsm = (DatabaseStoreMessage)data;
|
||||||
if (dsm.getValueType() == DatabaseStoreMessage.KEY_TYPE_LEASESET)
|
try {
|
||||||
_context.netDb().store(dsm.getKey(), dsm.getLeaseSet());
|
if (dsm.getValueType() == DatabaseStoreMessage.KEY_TYPE_LEASESET)
|
||||||
else
|
_context.netDb().store(dsm.getKey(), dsm.getLeaseSet());
|
||||||
_context.netDb().store(dsm.getKey(), dsm.getRouterInfo());
|
else
|
||||||
|
_context.netDb().store(dsm.getKey(), dsm.getRouterInfo());
|
||||||
|
} catch (IllegalArgumentException iae) {
|
||||||
|
if (_log.shouldLog(Log.WARN))
|
||||||
|
_log.warn("Bad store attempt", iae);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
_context.inNetMessagePool().add(data, null, null);
|
_context.inNetMessagePool().add(data, null, null);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user