From b91f041ad73f3d29e491e3794229de1c7f72c551 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Mon, 27 Jan 2014 16:38:00 +0000 Subject: [PATCH] I2CP: - Add missing session ID assignments in HostLookup/Reply constructors --- core/java/src/net/i2p/data/i2cp/HostLookupMessage.java | 2 ++ core/java/src/net/i2p/data/i2cp/HostReplyMessage.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/data/i2cp/HostLookupMessage.java b/core/java/src/net/i2p/data/i2cp/HostLookupMessage.java index 570858d5f9..1a8fcfe862 100644 --- a/core/java/src/net/i2p/data/i2cp/HostLookupMessage.java +++ b/core/java/src/net/i2p/data/i2cp/HostLookupMessage.java @@ -47,6 +47,7 @@ public class HostLookupMessage extends I2CPMessageImpl { throw new IllegalArgumentException(); if (timeout <= 0 || timeout > MAX_INT) throw new IllegalArgumentException(); + _sessionId = id; _hash = h; _reqID = reqID; _timeout = timeout; @@ -64,6 +65,7 @@ public class HostLookupMessage extends I2CPMessageImpl { throw new IllegalArgumentException(); if (timeout <= 0 || timeout > MAX_INT) throw new IllegalArgumentException(); + _sessionId = id; _host = host; _reqID = reqID; _timeout = timeout; diff --git a/core/java/src/net/i2p/data/i2cp/HostReplyMessage.java b/core/java/src/net/i2p/data/i2cp/HostReplyMessage.java index d4a8102e2f..37faaa276f 100644 --- a/core/java/src/net/i2p/data/i2cp/HostReplyMessage.java +++ b/core/java/src/net/i2p/data/i2cp/HostReplyMessage.java @@ -46,6 +46,7 @@ public class HostReplyMessage extends I2CPMessageImpl { throw new IllegalArgumentException(); if (reqID < 0 || reqID > MAX_INT) throw new IllegalArgumentException(); + _sessionId = id; _dest = d; _reqID = reqID; } @@ -63,6 +64,7 @@ public class HostReplyMessage extends I2CPMessageImpl { throw new IllegalArgumentException(); if (reqID < 0 || reqID > MAX_INT) throw new IllegalArgumentException(); + _sessionId = id; _code = failureCode; _reqID = reqID; } @@ -135,7 +137,7 @@ public class HostReplyMessage extends I2CPMessageImpl { buf.append("[HostReplyMessage: "); buf.append("\n\t").append(_sessionId); buf.append("\n\tReqID: ").append(_reqID); - buf.append("\n\tCode: ").append(_code); + buf.append("\n\tResult: ").append(_code); if (_code == RESULT_SUCCESS) buf.append("\n\tDestination: ").append(_dest); buf.append("]"); -- GitLab