diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 79005ea..746869e 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -89,7 +89,8 @@ m_current(), m_startup(), m_exclude(false), m_inactivityTimer(1000U), -m_lostTimer(1000U, 120U) +m_lostTimer(1000U, 120U), +m_fcsNetworkEnabled(false) { } @@ -204,8 +205,8 @@ int CYSFGateway::run() } } - bool fcsNetworkEnabled = m_conf.getFCSNetworkEnabled(); - if (fcsNetworkEnabled) { + m_fcsNetworkEnabled = m_conf.getFCSNetworkEnabled(); + if (m_fcsNetworkEnabled) { unsigned int txFrequency = m_conf.getTxFrequency(); unsigned int rxFrequency = m_conf.getRxFrequency(); std::string locator = calculateLocator(); @@ -478,7 +479,8 @@ void CYSFGateway::createWiresX(CYSFNetwork* rptNetwork) m_wiresX->setYSF2P25(address, port); std::string filename = m_conf.getFCSNetworkFile(); - readFCSRoomsFile(filename); + if (m_fcsNetworkEnabled) + readFCSRoomsFile(filename); m_reflectors->load(); m_wiresX->start(); diff --git a/YSFGateway/YSFGateway.h b/YSFGateway/YSFGateway.h index c6e702e..755142b 100644 --- a/YSFGateway/YSFGateway.h +++ b/YSFGateway/YSFGateway.h @@ -60,6 +60,7 @@ private: bool m_exclude; CTimer m_inactivityTimer; CTimer m_lostTimer; + bool m_fcsNetworkEnabled; void startupLinking(); std::string calculateLocator();