mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
cleaned up from duplicated methods
This commit is contained in:
parent
e96ffd4189
commit
ab843b6552
6 changed files with 6 additions and 9 deletions
4
SSU.cpp
4
SSU.cpp
|
@ -359,10 +359,10 @@ namespace transport
|
|||
uint8_t * payload = buf + sizeof (SSUHeader);
|
||||
*payload = 1; // 1 fragment
|
||||
payload++; // info
|
||||
size_t identLen = sizeof (i2p::context.GetRouterIdentity ()); // 387 bytes
|
||||
size_t identLen = i2p::data::DEFAULT_IDENTITY_SIZE; // 387 bytes
|
||||
*(uint16_t *)(payload) = htobe16 (identLen);
|
||||
payload += 2; // cursize
|
||||
memcpy (payload, (uint8_t *)&i2p::context.GetRouterIdentity (), identLen);
|
||||
memcpy (payload, (uint8_t *)&i2p::context.GetIdentity ().GetStandardIdentity (), identLen); // TODO
|
||||
payload += identLen;
|
||||
uint32_t signedOnTime = i2p::util::GetSecondsSinceEpoch ();
|
||||
*(uint32_t *)(payload) = htobe32 (signedOnTime); // signed on time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue