diff --git a/I2NPProtocol.cpp b/I2NPProtocol.cpp index 9d7ccf18..0e189218 100644 --- a/I2NPProtocol.cpp +++ b/I2NPProtocol.cpp @@ -77,8 +77,7 @@ namespace i2p } else // for SSU establishment { - auto rnd = i2p::context.GetRandomNumberGenerator (); - msg.msgID = htobe32 (rnd.GenerateWord32 ()); + msg.msgID = htobe32 (i2p::context.GetRandomNumberGenerator ().GenerateWord32 ()); msg.timestamp = htobe64 (2); // netID = 2 } return CreateI2NPMessage (eI2NPDeliveryStatus, (uint8_t *)&msg, sizeof (msg)); diff --git a/SSU.cpp b/SSU.cpp index 26530125..aed6b218 100644 --- a/SSU.cpp +++ b/SSU.cpp @@ -309,7 +309,7 @@ namespace ssu // encrypt message with intro key FillHeaderAndEncrypt (PAYLOAD_TYPE_SESSION_CREATED, buf, 368, introKey, iv, introKey); - m_State = eSessionStateRequestSent; + m_State = eSessionStateCreatedSent; m_Server->Send (buf, 368, m_RemoteEndpoint); }