1
0
Fork 0

Clean up the gateway configuration.

ycs232-kbc
Jonathan Naylor 8 years ago
parent 76e9013074
commit 6782b4bf0d

@ -61,7 +61,7 @@ m_aprsServer(),
m_aprsPort(0U), m_aprsPort(0U),
m_aprsPassword(), m_aprsPassword(),
m_networkEnabled(false), m_networkEnabled(false),
m_networkDataPort(0U), m_networkPort(0U),
m_networkHosts(), m_networkHosts(),
m_networkReloadTime(0U), m_networkReloadTime(0U),
m_networkParrotAddress("127.0.0.1"), m_networkParrotAddress("127.0.0.1"),
@ -171,8 +171,8 @@ bool CConf::read()
} else if (section == SECTION_NETWORK) { } else if (section == SECTION_NETWORK) {
if (::strcmp(key, "Enable") == 0) if (::strcmp(key, "Enable") == 0)
m_networkEnabled = ::atoi(value) == 1; m_networkEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "DataPort") == 0) else if (::strcmp(key, "Port") == 0)
m_networkDataPort = (unsigned int)::atoi(value); m_networkPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "Hosts") == 0) else if (::strcmp(key, "Hosts") == 0)
m_networkHosts = value; m_networkHosts = value;
else if (::strcmp(key, "ReloadTime") == 0) else if (::strcmp(key, "ReloadTime") == 0)
@ -313,9 +313,9 @@ bool CConf::getNetworkEnabled() const
return m_networkEnabled; return m_networkEnabled;
} }
unsigned int CConf::getNetworkDataPort() const unsigned int CConf::getNetworkPort() const
{ {
return m_networkDataPort; return m_networkPort;
} }
std::string CConf::getNetworkHosts() const std::string CConf::getNetworkHosts() const

@ -63,7 +63,7 @@ public:
// The Network section // The Network section
bool getNetworkEnabled() const; bool getNetworkEnabled() const;
unsigned int getNetworkDataPort() const; unsigned int getNetworkPort() const;
std::string getNetworkHosts() const; std::string getNetworkHosts() const;
unsigned int getNetworkReloadTime() const; unsigned int getNetworkReloadTime() const;
std::string getNetworkParrotAddress() const; std::string getNetworkParrotAddress() const;
@ -101,7 +101,7 @@ private:
std::string m_aprsPassword; std::string m_aprsPassword;
bool m_networkEnabled; bool m_networkEnabled;
unsigned int m_networkDataPort; unsigned int m_networkPort;
std::string m_networkHosts; std::string m_networkHosts;
unsigned int m_networkReloadTime; unsigned int m_networkReloadTime;
std::string m_networkParrotAddress; std::string m_networkParrotAddress;

@ -182,7 +182,7 @@ int CYSFGateway::run()
return 1; return 1;
} }
unsigned int netPort = m_conf.getNetworkDataPort(); unsigned int netPort = m_conf.getNetworkPort();
m_netNetwork = new CNetwork(netPort, m_callsign, debug); m_netNetwork = new CNetwork(netPort, m_callsign, debug);
ret = m_netNetwork->open(); ret = m_netNetwork->open();

@ -34,7 +34,7 @@ Password=9999
[Network] [Network]
Enable=1 Enable=1
DataPort=42000 Port=42000
Hosts=./YSFHosts.txt Hosts=./YSFHosts.txt
ReloadTime=60 ReloadTime=60
ParrotAddress=127.0.0.1 ParrotAddress=127.0.0.1

Loading…
Cancel
Save