forked from I2P_Developers/i2p.i2p
* I2NP: Allow message to be written more than once,
instead of throwing an IllegalStateException
This commit is contained in:
@ -37,7 +37,6 @@ public class UnknownI2NPMessage extends I2NPMessageImpl {
|
||||
|
||||
/** warning - only public for equals() */
|
||||
public byte[] getData() {
|
||||
verifyUnwritten();
|
||||
return _data;
|
||||
}
|
||||
|
||||
@ -62,7 +61,6 @@ public class UnknownI2NPMessage extends I2NPMessageImpl {
|
||||
|
||||
/** write the message body to the output array, starting at the given index */
|
||||
protected int writeMessageBody(byte out[], int curIndex) {
|
||||
verifyUnwritten();
|
||||
if (_data == null) {
|
||||
out[curIndex++] = 0x0;
|
||||
out[curIndex++] = 0x0;
|
||||
@ -78,12 +76,6 @@ public class UnknownI2NPMessage extends I2NPMessageImpl {
|
||||
return curIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void written() {
|
||||
super.written();
|
||||
_data = null;
|
||||
}
|
||||
|
||||
/** @return 0-255 */
|
||||
public int getType() { return _type; }
|
||||
|
||||
|
Reference in New Issue
Block a user