fix indent in HTTPServer, add RI log messages

This commit is contained in:
R4SAS 2019-05-22 23:29:35 +03:00
parent 7ab29950a4
commit 0e89452056
4 changed files with 36 additions and 33 deletions

View file

@ -621,10 +621,10 @@ namespace i2p
m_RouterInfo.DeleteProperty ("coreVersion");
m_RouterInfo.DeleteProperty ("stat_uptime");
bool ipv4; i2p::config::GetOption("ipv4", ipv4);
/*bool ipv4; i2p::config::GetOption("ipv4", ipv4);
bool ipv6; i2p::config::GetOption("ipv6", ipv6);
SetSupportsV4(ipv4);
SetSupportsV6(ipv6);
SetSupportsV6(ipv6);*/
}
else
{

View file

@ -677,6 +677,7 @@ namespace data
for (const auto& it: *m_Addresses) // don't insert same address twice
if (*it == *addr) return;
m_SupportedTransports |= addr->host.is_v6 () ? eNTCPV6 : eNTCPV4;
LogPrint (eLogInfo, "RouterInfo: added NTCP address ", addr->host.to_string(), ":", addr->port, " to our RI");
m_Addresses->push_front(std::move(addr)); // always make NTCP first
}
@ -694,6 +695,7 @@ namespace data
for (const auto& it: *m_Addresses) // don't insert same address twice
if (*it == *addr) return;
m_SupportedTransports |= addr->host.is_v6 () ? eSSUV6 : eSSUV4;
LogPrint (eLogInfo, "RouterInfo: added SSU address ", addr->host.to_string(), ":", addr->port, " to our RI");
m_Addresses->push_back(std::move(addr));
m_Caps |= eSSUTesting;
@ -713,6 +715,7 @@ namespace data
if (port) addr->ntcp2->isPublished = true;
memcpy (addr->ntcp2->staticKey, staticKey, 32);
memcpy (addr->ntcp2->iv, iv, 16);
LogPrint (eLogInfo, "RouterInfo: added NTCP2 address ", addr->host.to_string(), ":", addr->port, " to our RI");
m_Addresses->push_back(std::move(addr));
}