I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 94bba8d1 authored by zzz's avatar zzz
Browse files

I2CP: Fix external I2CP SendMessageExpires, broken in previous cleanup

parent 5c2b5075
No related branches found
No related tags found
No related merge requests found
...@@ -84,8 +84,8 @@ public class SendMessageMessage extends I2CPMessageImpl { ...@@ -84,8 +84,8 @@ public class SendMessageMessage extends I2CPMessageImpl {
*/ */
@Override @Override
public void readMessage(InputStream in, int length, int type) throws I2CPMessageException, IOException { public void readMessage(InputStream in, int length, int type) throws I2CPMessageException, IOException {
if (type != MESSAGE_TYPE) if (type != getType())
throw new I2CPMessageException("Invalid message type (found: " + type + " supported: " + MESSAGE_TYPE throw new I2CPMessageException("Invalid message type (found: " + type + " supported: " + getType()
+ " class: " + getClass().getName() + ")"); + " class: " + getClass().getName() + ")");
if (length < 0) throw new IOException("Negative payload size"); if (length < 0) throw new IOException("Negative payload size");
...@@ -129,7 +129,7 @@ public class SendMessageMessage extends I2CPMessageImpl { ...@@ -129,7 +129,7 @@ public class SendMessageMessage extends I2CPMessageImpl {
try { try {
DataHelper.writeLong(out, 4, len); DataHelper.writeLong(out, 4, len);
DataHelper.writeLong(out, 1, MESSAGE_TYPE); DataHelper.writeLong(out, 1, getType());
_sessionId.writeBytes(out); _sessionId.writeBytes(out);
_destination.writeBytes(out); _destination.writeBytes(out);
_payload.writeBytes(out); _payload.writeBytes(out);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment