diff --git a/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java b/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java index e241ff1f4..757549e49 100644 --- a/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java +++ b/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java @@ -362,10 +362,10 @@ public abstract class I2NPMessageImpl extends DataStructureImpl implements I2NPM return new TunnelGatewayMessage(context); case DataMessage.MESSAGE_TYPE: return new DataMessage(context); - case TunnelCreateMessage.MESSAGE_TYPE: - return new TunnelCreateMessage(context); - case TunnelCreateStatusMessage.MESSAGE_TYPE: - return new TunnelCreateStatusMessage(context); + //case TunnelCreateMessage.MESSAGE_TYPE: + // return new TunnelCreateMessage(context); + //case TunnelCreateStatusMessage.MESSAGE_TYPE: + // return new TunnelCreateStatusMessage(context); case TunnelBuildMessage.MESSAGE_TYPE: return new TunnelBuildMessage(context); case TunnelBuildReplyMessage.MESSAGE_TYPE: diff --git a/router/java/src/net/i2p/router/InNetMessagePool.java b/router/java/src/net/i2p/router/InNetMessagePool.java index 802aedec0..1d3cac39d 100644 --- a/router/java/src/net/i2p/router/InNetMessagePool.java +++ b/router/java/src/net/i2p/router/InNetMessagePool.java @@ -18,8 +18,8 @@ import net.i2p.data.i2np.DatabaseLookupMessage; import net.i2p.data.i2np.DatabaseSearchReplyMessage; import net.i2p.data.i2np.DeliveryStatusMessage; import net.i2p.data.i2np.I2NPMessage; -import net.i2p.data.i2np.TunnelCreateMessage; -import net.i2p.data.i2np.TunnelCreateStatusMessage; +//import net.i2p.data.i2np.TunnelCreateMessage; +//import net.i2p.data.i2np.TunnelCreateStatusMessage; import net.i2p.data.i2np.TunnelDataMessage; import net.i2p.data.i2np.TunnelGatewayMessage; import net.i2p.util.I2PThread; @@ -74,7 +74,7 @@ public class InNetMessagePool implements Service { _context.statManager().createRateStat("inNetPool.dropped", "How often do we drop a message", "InNetPool", new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l }); _context.statManager().createRateStat("inNetPool.droppedDeliveryStatusDelay", "How long after a delivery status message is created do we receive it back again (for messages that are too slow to be handled)", "InNetPool", new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l }); _context.statManager().createRateStat("inNetPool.duplicate", "How often do we receive a duplicate message", "InNetPool", new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l }); - _context.statManager().createRateStat("inNetPool.droppedTunnelCreateStatusMessage", "How often we drop a slow-to-arrive tunnel request response", "InNetPool", new long[] { 60*60*1000l, 24*60*60*1000l }); + //_context.statManager().createRateStat("inNetPool.droppedTunnelCreateStatusMessage", "How often we drop a slow-to-arrive tunnel request response", "InNetPool", new long[] { 60*60*1000l, 24*60*60*1000l }); _context.statManager().createRateStat("inNetPool.droppedDbLookupResponseMessage", "How often we drop a slow-to-arrive db search response", "InNetPool", new long[] { 60*60*1000l, 24*60*60*1000l }); _context.statManager().createRateStat("pool.dispatchDataTime", "How long a tunnel dispatch takes", "Tunnels", new long[] { 10*60*1000l, 60*60*1000l, 24*60*60*1000l }); _context.statManager().createRateStat("pool.dispatchGatewayTime", "How long a tunnel gateway dispatch takes", "Tunnels", new long[] { 10*60*1000l, 60*60*1000l, 24*60*60*1000l }); @@ -125,8 +125,8 @@ public class InNetMessagePool implements Service { if (invalidReason != null) { int level = Log.WARN; - if (messageBody instanceof TunnelCreateMessage) - level = Log.INFO; + //if (messageBody instanceof TunnelCreateMessage) + // level = Log.INFO; if (_log.shouldLog(level)) _log.log(level, "Duplicate message received [" + messageBody.getUniqueId() + " expiring on " + exp + "]: " + messageBody.getClass().getName() + ": " + invalidReason @@ -195,10 +195,10 @@ public class InNetMessagePool implements Service { _log.warn("Dropping unhandled delivery status message created " + timeSinceSent + "ms ago: " + messageBody); _context.statManager().addRateData("inNetPool.droppedDeliveryStatusDelay", timeSinceSent, timeSinceSent); } - } else if (type == TunnelCreateStatusMessage.MESSAGE_TYPE) { - if (_log.shouldLog(Log.INFO)) - _log.info("Dropping slow tunnel create request response: " + messageBody); - _context.statManager().addRateData("inNetPool.droppedTunnelCreateStatusMessage", 1, 0); + //} else if (type == TunnelCreateStatusMessage.MESSAGE_TYPE) { + // if (_log.shouldLog(Log.INFO)) + // _log.info("Dropping slow tunnel create request response: " + messageBody); + // _context.statManager().addRateData("inNetPool.droppedTunnelCreateStatusMessage", 1, 0); } else if (type == DatabaseSearchReplyMessage.MESSAGE_TYPE) { if (_log.shouldLog(Log.INFO)) _log.info("Dropping slow db lookup response: " + messageBody); diff --git a/router/java/src/net/i2p/router/MessageHistory.java b/router/java/src/net/i2p/router/MessageHistory.java index ed5f9fc6d..4db6c47c6 100644 --- a/router/java/src/net/i2p/router/MessageHistory.java +++ b/router/java/src/net/i2p/router/MessageHistory.java @@ -123,6 +123,7 @@ public class MessageHistory { * @param replyTunnel the tunnel sourceRoutePeer should forward the source routed message to * @param replyThrough the gateway of the tunnel that the sourceRoutePeer will be sending to */ +/******** public void requestTunnelCreate(TunnelId createTunnel, TunnelId outTunnel, Hash peerRequested, Hash nextPeer, TunnelId replyTunnel, Hash replyThrough) { if (!_doLog) return; StringBuilder buf = new StringBuilder(128); @@ -137,6 +138,7 @@ public class MessageHistory { buf.append("who forwards it through [").append(replyTunnel.getTunnelId()).append("] on [").append(getName(replyThrough)).append("]"); addEntry(buf.toString()); } +*********/ /** * The local router has received a request to join the createTunnel with the next hop being nextPeer, @@ -148,6 +150,7 @@ public class MessageHistory { * @param ok whether we will join the tunnel * @param sourceRoutePeer peer through whom we should send our garlic routed ok through */ +/********* public void receiveTunnelCreate(TunnelId createTunnel, Hash nextPeer, Date expire, boolean ok, Hash sourceRoutePeer) { if (!_doLog) return; StringBuilder buf = new StringBuilder(128); @@ -158,6 +161,7 @@ public class MessageHistory { buf.append("ok? ").append(ok).append(" expiring on [").append(getTime(expire.getTime())).append("]"); addEntry(buf.toString()); } +*********/ /** * The local router has joined the given tunnel operating in the given state. diff --git a/router/java/src/net/i2p/data/i2np/TunnelCreateMessage.java b/router/java/test/net/i2p/data/i2np/TunnelCreateMessage.java similarity index 100% rename from router/java/src/net/i2p/data/i2np/TunnelCreateMessage.java rename to router/java/test/net/i2p/data/i2np/TunnelCreateMessage.java diff --git a/router/java/src/net/i2p/data/i2np/TunnelCreateStatusMessage.java b/router/java/test/net/i2p/data/i2np/TunnelCreateStatusMessage.java similarity index 100% rename from router/java/src/net/i2p/data/i2np/TunnelCreateStatusMessage.java rename to router/java/test/net/i2p/data/i2np/TunnelCreateStatusMessage.java