Tell the main process network type

This commit is contained in:
Benau 2020-03-01 00:40:29 +08:00
parent e584bced0e
commit 8b8f03ad75
2 changed files with 7 additions and 0 deletions

View File

@ -89,6 +89,8 @@ void ChildLoop::run()
{
NetworkConfig::get()->setIPType(NetworkConfig::IP_V4);
NetworkConfig::get()->detectIPType();
NetworkConfig::getByType(PT_MAIN)->setIPType(
NetworkConfig::get()->getIPType());
NetworkConfig::get()->setIsWAN();
NetworkConfig::get()->setIsPublicServer();
}

View File

@ -130,6 +130,11 @@ public:
return m_network_config[type];
} // get
// ------------------------------------------------------------------------
static NetworkConfig* getByType(ProcessType type)
{
return m_network_config[type];
} // get
// ------------------------------------------------------------------------
static void destroy()
{
ProcessType type = STKProcess::getType();