mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
Merge pull request #2011 from Vort/net_status
log changes of network status
This commit is contained in:
commit
faaa8115d9
@ -303,6 +303,8 @@ namespace i2p
|
|||||||
SetTesting (false);
|
SetTesting (false);
|
||||||
if (status != m_Status)
|
if (status != m_Status)
|
||||||
{
|
{
|
||||||
|
LogPrint(eLogInfo, "Router: network status v4 changed ",
|
||||||
|
ROUTER_STATUS_NAMES[m_Status], " -> ", ROUTER_STATUS_NAMES[status]);
|
||||||
m_Status = status;
|
m_Status = status;
|
||||||
switch (m_Status)
|
switch (m_Status)
|
||||||
{
|
{
|
||||||
@ -323,6 +325,8 @@ namespace i2p
|
|||||||
SetTestingV6 (false);
|
SetTestingV6 (false);
|
||||||
if (status != m_StatusV6)
|
if (status != m_StatusV6)
|
||||||
{
|
{
|
||||||
|
LogPrint(eLogInfo, "Router: network status v6 changed ",
|
||||||
|
ROUTER_STATUS_NAMES[m_StatusV6], " -> ", ROUTER_STATUS_NAMES[status]);
|
||||||
m_StatusV6 = status;
|
m_StatusV6 = status;
|
||||||
switch (m_StatusV6)
|
switch (m_StatusV6)
|
||||||
{
|
{
|
||||||
|
@ -48,6 +48,15 @@ namespace garlic
|
|||||||
eRouterStatusMesh = 4
|
eRouterStatusMesh = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char* const ROUTER_STATUS_NAMES[] =
|
||||||
|
{
|
||||||
|
"OK", // 0
|
||||||
|
"Firewalled", // 1
|
||||||
|
"Unknown", // 2
|
||||||
|
"Proxy", // 3
|
||||||
|
"Mesh" // 4
|
||||||
|
};
|
||||||
|
|
||||||
enum RouterError
|
enum RouterError
|
||||||
{
|
{
|
||||||
eRouterErrorNone = 0,
|
eRouterErrorNone = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user