cleanups and comments

This commit is contained in:
zzz
2010-03-08 22:17:46 +00:00
parent e93d2046d3
commit 5b603d6627
3 changed files with 5 additions and 3 deletions

View File

@ -101,7 +101,7 @@ public class TrivialPreprocessor implements TunnelGateway.QueuePreprocessor {
* @deprecated unused except by above * @deprecated unused except by above
*/ */
private byte[][] preprocess(TunnelGateway.Pending msg) { private byte[][] preprocess(TunnelGateway.Pending msg) {
List fragments = new ArrayList(1); List<byte[]> fragments = new ArrayList(1);
while (msg.getOffset() < msg.getData().length) { while (msg.getOffset() < msg.getData().length) {
fragments.add(preprocessFragment(msg)); fragments.add(preprocessFragment(msg));
@ -111,7 +111,7 @@ public class TrivialPreprocessor implements TunnelGateway.QueuePreprocessor {
byte rv[][] = new byte[fragments.size()][]; byte rv[][] = new byte[fragments.size()][];
for (int i = 0; i < fragments.size(); i++) for (int i = 0; i < fragments.size(); i++)
rv[i] = (byte[])fragments.get(i); rv[i] = fragments.get(i);
return rv; return rv;
} }

View File

@ -726,6 +726,7 @@ public class TunnelDispatcher implements Service {
startup(); startup();
} }
/** @deprecated moved to router console */
public void renderStatusHTML(Writer out) throws IOException {} public void renderStatusHTML(Writer out) throws IOException {}
private class LeaveTunnel extends JobImpl { private class LeaveTunnel extends JobImpl {

View File

@ -180,7 +180,8 @@ public abstract class TunnelPeerSelector {
peers.addAll(ctx.tunnelManager().selectPeersInTooManyTunnels()); peers.addAll(ctx.tunnelManager().selectPeersInTooManyTunnels());
// if (false && filterUnreachable(ctx, isInbound, isExploratory)) { // if (false && filterUnreachable(ctx, isInbound, isExploratory)) {
if (filterUnreachable(ctx, isInbound, isExploratory)) { if (filterUnreachable(ctx, isInbound, isExploratory)) {
List caps = ctx.peerManager().getPeersByCapability(Router.CAPABILITY_UNREACHABLE); // This is the only use for getPeersByCapability? And the whole set of datastructures in PeerManager?
List<Hash> caps = ctx.peerManager().getPeersByCapability(Router.CAPABILITY_UNREACHABLE);
if (caps != null) if (caps != null)
peers.addAll(caps); peers.addAll(caps);
caps = ctx.profileOrganizer().selectPeersLocallyUnreachable(); caps = ctx.profileOrganizer().selectPeersLocallyUnreachable();