Changeset 884818f


Ignore:
Timestamp:
Nov 2, 2013 1:58:12 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
06ea9af
Parents:
3f39bd0f
Message:

log tweaks, generics

Location:
router/java/src/net/i2p/router
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/OutNetMessage.java

    r3f39bd0f r884818f  
    378378            buf.append("a ").append(_messageSize).append(" byte ");
    379379            buf.append(getMessageType());
     380            buf.append(" ID ").append(_messageId);
    380381        }
    381382        buf.append(" expiring on ").append(new Date(_expiration));
  • router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java

    r3f39bd0f r884818f  
    241241            else
    242242                buf.append("me");
    243             buf.append('.');
    244             if (_config[i].getSendTunnel() != null)
     243            if (_config[i].getSendTunnel() != null) {
     244                buf.append('.');
    245245                buf.append(_config[i].getSendTunnel());
    246             else
    247                 buf.append("me");
     246            } else if (_isInbound || i == 0) {
     247                buf.append(".me");
     248            }
    248249            if (i + 1 < _peers.length)
    249250                buf.append("-->");
  • router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java

    r3f39bd0f r884818f  
    66import java.util.Set;
    77
     8import net.i2p.data.DataHelper;
    89import net.i2p.data.Hash;
    910import net.i2p.router.RouterContext;
     
    5758        // connected to and so they have our real RI - to maximize the chance
    5859        // that the adjacent hop can connect to us.
    59         if (settings.isInbound() && ctx.router().isHidden())
     60        if (settings.isInbound() && ctx.router().isHidden()) {
     61            if (l.shouldLog(Log.INFO))
     62                l.info("EPS SFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size());
    6063            ctx.profileOrganizer().selectFastPeers(length, exclude, matches);
    61         else if (exploreHighCap)
     64        } else if (exploreHighCap) {
     65            if (l.shouldLog(Log.INFO))
     66                l.info("EPS SHCP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size());
    6267            ctx.profileOrganizer().selectHighCapacityPeers(length, exclude, matches);
    63         else if (ctx.commSystem().haveHighOutboundCapacity())
     68        } else if (ctx.commSystem().haveHighOutboundCapacity()) {
     69            if (l.shouldLog(Log.INFO))
     70                l.info("EPS SNFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size());
    6471            ctx.profileOrganizer().selectNotFailingPeers(length, exclude, matches, false);
    65         else // use only connected peers so we don't make more connections
     72        } else { // use only connected peers so we don't make more connections
     73            if (l.shouldLog(Log.INFO))
     74                l.info("EPS SANFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size());
    6675            ctx.profileOrganizer().selectActiveNotFailingPeers(length, exclude, matches);
    67        
    68         if (l.shouldLog(Log.DEBUG))
    69             l.debug("profileOrganizer.selectNotFailing(" + length + ") found " + matches);
     76        }
    7077       
    7178        matches.remove(ctx.routerHash());
     
    7380        if (rv.size() > 1)
    7481            orderPeers(rv, settings.getRandomKey());
     82        if (l.shouldLog(Log.DEBUG))
     83            l.debug("EPS got " + rv.size() + ": " + DataHelper.toString(rv));
    7584        if (settings.isInbound())
    7685            rv.add(0, ctx.routerHash());
  • router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java

    r3f39bd0f r884818f  
    219219            if (excl != null) {
    220220                FloodfillNetworkDatabaseFacade fac = (FloodfillNetworkDatabaseFacade)ctx.netDb();
    221                 List known = fac.getKnownRouterData();
     221                List<RouterInfo> known = fac.getKnownRouterData();
    222222                if (known != null) {
    223223                    for (int i = 0; i < known.size(); i++) {
    224                         RouterInfo peer = (RouterInfo)known.get(i);
     224                        RouterInfo peer = known.get(i);
    225225                        boolean shouldExclude = shouldExclude(ctx, log, peer, excl);
    226226                        if (shouldExclude) {
Note: See TracChangeset for help on using the changeset viewer.