2008-09-19 zzz

* Tunnels:
      - Add missing message accounting for inbound gateways,
        we were underestimating participating traffic because of it,
        and the tunnels were classified "inactive"
      - Add participating tunnel role on tunnels.jsp
This commit is contained in:
zzz
2008-09-19 01:03:57 +00:00
parent 0bbc94f43c
commit 6b1224b23e
4 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2008-09-19 zzz
* Tunnels:
- Add missing message accounting for inbound gateways,
we were underestimating participating traffic because of it,
and the tunnels were classified "inactive"
- Add participating tunnel role on tunnels.jsp
2008-09-18 zzz
* Throttle:
- Correctly check inbound and outbound total bw limits separately

View File

@ -17,7 +17,7 @@ import net.i2p.CoreVersion;
public class RouterVersion {
public final static String ID = "$Revision: 1.548 $ $Date: 2008-06-07 23:00:00 $";
public final static String VERSION = "0.6.3";
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);

View File

@ -33,6 +33,7 @@ public class InboundGatewayReceiver implements TunnelGateway.Receiver {
}
}
_config.incrementProcessedMessages();
TunnelDataMessage msg = new TunnelDataMessage(_context);
msg.setData(encrypted);
msg.setTunnelId(_config.getSendTunnel());

View File

@ -448,7 +448,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
out.write("<h2><a name=\"participating\">Participating tunnels</a>:</h2><table border=\"1\">\n");
out.write("<tr><td><b>Receive on</b></td><td><b>From</b></td><td>"
+ "<b>Send on</b></td><td><b>To</b></td><td><b>Expiration</b></td>"
+ "<td><b>Usage</b></td></tr>\n");
+ "<td><b>Usage</b></td><td><b>Role</b></td></tr>\n");
long processed = 0;
RateStat rs = _context.statManager().getRate("tunnel.participatingMessageCount");
if (rs != null)
@ -468,21 +468,27 @@ public class TunnelPoolManager implements TunnelManagerFacade {
if (cfg.getReceiveFrom() != null)
out.write("<td>" + cfg.getReceiveFrom().toBase64().substring(0,4) +"</td>");
else
out.write("<td>n/a</td>");
out.write("<td>&nbsp;</td>");
if (cfg.getSendTunnel() != null)
out.write("<td>" + cfg.getSendTunnel().getTunnelId() +"</td>");
else
out.write("<td>n/a</td>");
out.write("<td>&nbsp;</td>");
if (cfg.getSendTo() != null)
out.write("<td>" + cfg.getSendTo().toBase64().substring(0,4) +"</td>");
else
out.write("<td>n/a</td>");
out.write("<td>&nbsp;</td>");
long timeLeft = cfg.getExpiration()-_context.clock().now();
if (timeLeft > 0)
out.write("<td align=right>" + DataHelper.formatDuration(timeLeft) + "</td>");
else
out.write("<td align=right>(grace period)</td>");
out.write("<td align=right>" + cfg.getProcessedMessagesCount() + "KB</td>");
if (cfg.getSendTo() == null)
out.write("<td>Outbound Endpoint</td>");
else if (cfg.getReceiveFrom() == null)
out.write("<td>Inbound Gateway</td>");
else
out.write("<td>Participant</td>");
out.write("</tr>\n");
processed += cfg.getProcessedMessagesCount();
}