From 94bba8d11f0ca99a4ded4ca88526b2c23247b001 Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 4 May 2015 12:36:03 +0000 Subject: [PATCH] I2CP: Fix external I2CP SendMessageExpires, broken in previous cleanup --- core/java/src/net/i2p/data/i2cp/SendMessageMessage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java b/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java index 37e5ea5f1..18f6c6df3 100644 --- a/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java +++ b/core/java/src/net/i2p/data/i2cp/SendMessageMessage.java @@ -84,8 +84,8 @@ public class SendMessageMessage extends I2CPMessageImpl { */ @Override public void readMessage(InputStream in, int length, int type) throws I2CPMessageException, IOException { - if (type != MESSAGE_TYPE) - throw new I2CPMessageException("Invalid message type (found: " + type + " supported: " + MESSAGE_TYPE + if (type != getType()) + throw new I2CPMessageException("Invalid message type (found: " + type + " supported: " + getType() + " class: " + getClass().getName() + ")"); if (length < 0) throw new IOException("Negative payload size"); @@ -129,7 +129,7 @@ public class SendMessageMessage extends I2CPMessageImpl { try { DataHelper.writeLong(out, 4, len); - DataHelper.writeLong(out, 1, MESSAGE_TYPE); + DataHelper.writeLong(out, 1, getType()); _sessionId.writeBytes(out); _destination.writeBytes(out); _payload.writeBytes(out);