|
|
@ -356,8 +356,10 @@ namespace i2p |
|
|
|
delete[] buf; |
|
|
|
delete[] buf; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
i2p::data::RouterInfo routerInfo(i2p::fs::DataDirPath (ROUTER_INFO)); // TODO
|
|
|
|
|
|
|
|
m_RouterInfo.SetRouterIdentity (GetIdentity ()); |
|
|
|
m_RouterInfo.SetRouterIdentity (GetIdentity ()); |
|
|
|
|
|
|
|
i2p::data::RouterInfo routerInfo(i2p::fs::DataDirPath (ROUTER_INFO)); |
|
|
|
|
|
|
|
if (!routerInfo.IsUnreachable ()) // router.info looks good
|
|
|
|
|
|
|
|
{ |
|
|
|
m_RouterInfo.Update (routerInfo.GetBuffer (), routerInfo.GetBufferLen ()); |
|
|
|
m_RouterInfo.Update (routerInfo.GetBuffer (), routerInfo.GetBufferLen ()); |
|
|
|
m_RouterInfo.SetProperty ("coreVersion", I2P_VERSION); |
|
|
|
m_RouterInfo.SetProperty ("coreVersion", I2P_VERSION); |
|
|
|
m_RouterInfo.SetProperty ("router.version", I2P_VERSION); |
|
|
|
m_RouterInfo.SetProperty ("router.version", I2P_VERSION); |
|
|
@ -365,6 +367,12 @@ namespace i2p |
|
|
|
// Migration to 0.9.24. TODO: remove later
|
|
|
|
// Migration to 0.9.24. TODO: remove later
|
|
|
|
m_RouterInfo.DeleteProperty ("coreVersion"); |
|
|
|
m_RouterInfo.DeleteProperty ("coreVersion"); |
|
|
|
m_RouterInfo.DeleteProperty ("stat_uptime"); |
|
|
|
m_RouterInfo.DeleteProperty ("stat_uptime"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LogPrint (eLogError, ROUTER_INFO, " is malformed. Creating new"); |
|
|
|
|
|
|
|
NewRouterInfo (); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (IsUnreachable ()) |
|
|
|
if (IsUnreachable ()) |
|
|
|
SetReachable (); // we assume reachable until we discover firewall through peer tests
|
|
|
|
SetReachable (); // we assume reachable until we discover firewall through peer tests
|
|
|
|