Changeset 732eddd


Ignore:
Timestamp:
Jul 10, 2013 6:14:18 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9a1e1a9
Parents:
2caa6ad9
Message:

toString() fix (NO_ACK)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/streaming/java/src/net/i2p/client/streaming/Packet.java

    r2caa6ad9 r732eddd  
    6262 * packet that should not be ACKed</p>
    6363 *
     64 * NOTE: All setters unsynchronized.
     65 *
    6466 */
    6567class Packet {
     
    210212     * if FLAG_NO_ACK is set.
    211213     *
    212      * @return The highest packet sequence number received on receiveStreamId
     214     * @return The highest packet sequence number received on receiveStreamId, or -1 if FLAG_NO_ACK
    213215     */
    214216    public long getAckThrough() {
     
    218220            return _ackThrough;
    219221    }
     222
     223    /**
     224     * @param id if < 0, sets FLAG_NO_ACK
     225     */
    220226    public void setAckThrough(long id) {
    221227        if (id < 0)
     
    673679    }
    674680   
    675         @Override
     681    @Override
    676682    public String toString() {
    677683        StringBuilder str = formatAsString();
     
    690696        buf.append(' ');
    691697        buf.append(toFlagString());
    692         buf.append(" ACK ").append(getAckThrough());
     698        if (isFlagSet(FLAG_NO_ACK))
     699            buf.append(" NO_ACK ");
     700        else
     701            buf.append(" ACK ").append(getAckThrough());
    693702        if (_nacks != null) {
    694703            buf.append(" NACK");
Note: See TracChangeset for help on using the changeset viewer.