mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +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.SetProperty ("start_uptime", "90m");
|
||||||
routerInfo.CreateBuffer ();
|
routerInfo.CreateBuffer ();
|
||||||
|
|
||||||
m_RouterInfo = routerInfo;
|
m_RouterInfo.Update (routerInfo.GetBuffer (), routerInfo.GetBufferLen ());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RouterContext::OverrideNTCPAddress (const char * host, int port)
|
void RouterContext::OverrideNTCPAddress (const char * host, int port)
|
||||||
|
@ -340,6 +340,8 @@ namespace data
|
|||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
WriteToStream (s);
|
WriteToStream (s);
|
||||||
m_BufferLen = s.str ().size ();
|
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);
|
memcpy (m_Buffer, s.str ().c_str (), m_BufferLen);
|
||||||
// signature
|
// signature
|
||||||
i2p::context.Sign ((uint8_t *)m_Buffer, m_BufferLen, (uint8_t *)m_Buffer + m_BufferLen);
|
i2p::context.Sign ((uint8_t *)m_Buffer, m_BufferLen, (uint8_t *)m_Buffer + m_BufferLen);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user