I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c8c10909 authored by jrandom's avatar jrandom Committed by zzz
Browse files

2005-09-12 jrandom

    * Bugfix for skewed store which could kill a UDP thread (causing complete
      comm failure and eventual OOM)
parent b5784d60
No related branches found
No related tags found
No related merge requests found
$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
* More aggressively publish updated routerInfo.
......
......@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
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 long BUILD = 6;
public final static long BUILD = 7;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
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) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("I2NPMessage received: " + message.getClass().getName(), new Exception("Where did I come from again?"));
int num = _context.inNetMessagePool().add(message, fromRouter, fromRouterHash);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Added to in pool: "+ num);
try {
int num = _context.inNetMessagePool().add(message, fromRouter, fromRouterHash);
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() {
......
......@@ -42,20 +42,21 @@ public class UDPAddress {
public String toString() {
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) {
for (int i = 0; i < _introHosts.length; i++) {
rv.append("intro[" + i + "]: ").append(_introHosts[i]);
rv.append(':').append(_introPorts[i]);
rv.append('/').append(Base64.encode(_introKeys[i])).append(' ');
rv.append("ssu://");
rv.append(_introTags[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();
}
......
......@@ -114,10 +114,15 @@ public class InboundMessageDistributor implements GarlicMessageReceiver.CloveRec
// treat db store explicitly, since we don't want to republish (or flood)
// unnecessarily
DatabaseStoreMessage dsm = (DatabaseStoreMessage)data;
if (dsm.getValueType() == DatabaseStoreMessage.KEY_TYPE_LEASESET)
_context.netDb().store(dsm.getKey(), dsm.getLeaseSet());
else
_context.netDb().store(dsm.getKey(), dsm.getRouterInfo());
try {
if (dsm.getValueType() == DatabaseStoreMessage.KEY_TYPE_LEASESET)
_context.netDb().store(dsm.getKey(), dsm.getLeaseSet());
else
_context.netDb().store(dsm.getKey(), dsm.getRouterInfo());
} catch (IllegalArgumentException iae) {
if (_log.shouldLog(Log.WARN))
_log.warn("Bad store attempt", iae);
}
} else {
_context.inNetMessagePool().add(data, null, null);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment