mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
proper update of own RouterInfo
This commit is contained in:
parent
3a8d4403f6
commit
1fc41e2fa9
@ -40,7 +40,7 @@ namespace i2p
|
||||
routerInfo.SetProperty ("start_uptime", "90m");
|
||||
routerInfo.CreateBuffer ();
|
||||
|
||||
m_RouterInfo = routerInfo;
|
||||
m_RouterInfo.Update (routerInfo.GetBuffer (), routerInfo.GetBufferLen ());
|
||||
}
|
||||
|
||||
void RouterContext::OverrideNTCPAddress (const char * host, int port)
|
||||
|
@ -340,6 +340,8 @@ namespace data
|
||||
std::stringstream s;
|
||||
WriteToStream (s);
|
||||
m_BufferLen = s.str ().size ();
|
||||
if (!m_Buffer)
|
||||
m_Buffer = new uint8_t[MAX_RI_BUFFER_SIZE];
|
||||
memcpy (m_Buffer, s.str ().c_str (), m_BufferLen);
|
||||
// signature
|
||||
i2p::context.Sign ((uint8_t *)m_Buffer, m_BufferLen, (uint8_t *)m_Buffer + m_BufferLen);
|
||||
|
Loading…
x
Reference in New Issue
Block a user