Changeset e64ad7c for router


Ignore:
Timestamp:
Aug 26, 2018 3:13:49 PM (23 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
c9002b32, f6c4535
Parents:
1f92232
Message:

More findbugs all over

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

Legend:

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

    r1f92232 re64ad7c  
    423423        //    end1--;
    424424        //}
    425         if (end1 <= 0)
    426             return null;  // blank
     425        //if (end1 <= 0)
     426        //    return null;  // blank
    427427        int start2 = -1;
    428428        int mask = -1;
  • router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java

    r1f92232 re64ad7c  
    496496   
    497497            if (_log.shouldLog(Log.DEBUG)) {
    498                 if (shouldEncrypt)
    499                     _log.debug("sending encrypted store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent);
    500                 else
    501                     _log.debug("sending store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent);
    502                 //_log.debug("Expiration is " + new Date(sent.getMessageExpiration()));
     498                _log.debug("sending encrypted store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent);
    503499            }
    504500            getContext().messageRegistry().registerPending(selector, onReply, onFail);
  • router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java

    r1f92232 re64ad7c  
    982982        Block block = new NTCP2Payload.RIBlock(ri, shouldFlood);
    983983        int size = block.getTotalLength();
    984         if (size > BUFFER_SIZE) {
     984        if (size + NTCP2Payload.BLOCK_HEADER_SIZE > BUFFER_SIZE) {
    985985            if (_log.shouldWarn())
    986986                _log.warn("RI too big: " + ri);
     
    994994            //block = new NTCP2Payload.PaddingBlock(_context, padlen);
    995995            block = new NTCP2Payload.PaddingBlock(padlen);
    996             size += block.getTotalLength();
    997996            blocks.add(block);
    998997        }
     
    10411040            //block = new NTCP2Payload.PaddingBlock(_context, padlen);
    10421041            block = new NTCP2Payload.PaddingBlock(padlen);
    1043             plen += block.getTotalLength();
    10441042            blocks.add(block);
    10451043        }
  • router/java/src/net/i2p/router/transport/udp/PeerState.java

    r1f92232 re64ad7c  
    19051905            _context.statManager().addRateData("udp.sendConfirmVolley", numSends);
    19061906            _transport.succeeded(state);
    1907             int numFragments = state.getFragmentCount();
    19081907            // this adjusts the rtt/rto/window/etc
    19091908            messageACKed(state.getMessageSize(), state.getLifetime(), numSends);
  • router/java/src/net/i2p/router/tunnel/FragmentedMessage.java

    r1f92232 re64ad7c  
    8888        if (fragmentNum > _highFragmentNum)
    8989            _highFragmentNum = fragmentNum;
    90         if (isLast && fragmentNum <= 0) {
    91             if (_log.shouldLog(Log.ERROR))
    92                 _log.error("hmm, isLast and fragmentNum=" + fragmentNum + " for message " + _messageId);
    93             return false;
    94         }
    9590        return true;
    9691    }
Note: See TracChangeset for help on using the changeset viewer.