Changeset 292b7e6d for router


Ignore:
Timestamp:
Jul 21, 2018 1:11:41 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1470ea2
Parents:
2800791
Message:

NTCP2 (ticket #2286):
Fix error sending large message
Fix NPE after handshake failure

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

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/data/i2np/TunnelGatewayMessage.java

    r2800791 r292b7e6d  
    9696        // where is this coming from?
    9797        if (curIndex + _msgData.length > out.length) {
    98             _log.log(Log.ERROR, "output buffer too small idx: " + curIndex + " len: " + _msgData.length + " outlen: " + out.length);
    99             throw new I2NPMessageException("Too much data to write out (id=" + _tunnelId + " data=" + _msg + ")");
     98            String txt = "output buffer too small idx: " + curIndex + " len: " + _msgData.length + " outlen: " + out.length;
     99            _log.error(txt);
     100            throw new I2NPMessageException(txt);
    100101        }
    101102        System.arraycopy(_msgData, 0, out, curIndex, _msgData.length);
  • router/java/src/net/i2p/router/RouterVersion.java

    r2800791 r292b7e6d  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 15;
     21    public final static long BUILD = 16;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java

    r2800791 r292b7e6d  
    906906            size += block.getTotalLength();
    907907        }
    908         sendNTCP2(buf.unencrypted, blocks);
     908        byte[] tmp = size <= BUFFER_SIZE ? buf.unencrypted : new byte[size];
     909        sendNTCP2(tmp, blocks);
    909910    }
    910911
     
    18211822        _nextMetaTime = Long.MAX_VALUE;
    18221823        _nextInfoTime = Long.MAX_VALUE;
     1824        _paddingConfig = OUR_PADDING;
    18231825        sendTermination(reason, 0);
    18241826        try { Thread.sleep(NTCP2_TERMINATION_CLOSE_DELAY); } catch (InterruptedException ie) {}
Note: See TracChangeset for help on using the changeset viewer.