forked from I2P_Developers/i2p.i2p
I2CP:
- Add missing session ID assignments in HostLookup/Reply constructors
This commit is contained in:
@ -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;
|
||||||
|
@ -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("]");
|
||||||
|
Reference in New Issue
Block a user