- Add missing session ID assignments in HostLookup/Reply constructors
This commit is contained in:
zzz
2014-01-27 16:38:00 +00:00
parent ba96f72899
commit b91f041ad7
2 changed files with 5 additions and 1 deletions

View File

@ -47,6 +47,7 @@ public class HostLookupMessage extends I2CPMessageImpl {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
if (timeout <= 0 || timeout > MAX_INT) if (timeout <= 0 || timeout > MAX_INT)
throw new IllegalArgumentException(); throw new IllegalArgumentException();
_sessionId = id;
_hash = h; _hash = h;
_reqID = reqID; _reqID = reqID;
_timeout = timeout; _timeout = timeout;
@ -64,6 +65,7 @@ public class HostLookupMessage extends I2CPMessageImpl {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
if (timeout <= 0 || timeout > MAX_INT) if (timeout <= 0 || timeout > MAX_INT)
throw new IllegalArgumentException(); throw new IllegalArgumentException();
_sessionId = id;
_host = host; _host = host;
_reqID = reqID; _reqID = reqID;
_timeout = timeout; _timeout = timeout;

View File

@ -46,6 +46,7 @@ public class HostReplyMessage extends I2CPMessageImpl {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
if (reqID < 0 || reqID > MAX_INT) if (reqID < 0 || reqID > MAX_INT)
throw new IllegalArgumentException(); throw new IllegalArgumentException();
_sessionId = id;
_dest = d; _dest = d;
_reqID = reqID; _reqID = reqID;
} }
@ -63,6 +64,7 @@ public class HostReplyMessage extends I2CPMessageImpl {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
if (reqID < 0 || reqID > MAX_INT) if (reqID < 0 || reqID > MAX_INT)
throw new IllegalArgumentException(); throw new IllegalArgumentException();
_sessionId = id;
_code = failureCode; _code = failureCode;
_reqID = reqID; _reqID = reqID;
} }
@ -135,7 +137,7 @@ public class HostReplyMessage extends I2CPMessageImpl {
buf.append("[HostReplyMessage: "); buf.append("[HostReplyMessage: ");
buf.append("\n\t").append(_sessionId); buf.append("\n\t").append(_sessionId);
buf.append("\n\tReqID: ").append(_reqID); buf.append("\n\tReqID: ").append(_reqID);
buf.append("\n\tCode: ").append(_code); buf.append("\n\tResult: ").append(_code);
if (_code == RESULT_SUCCESS) if (_code == RESULT_SUCCESS)
buf.append("\n\tDestination: ").append(_dest); buf.append("\n\tDestination: ").append(_dest);
buf.append("]"); buf.append("]");