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

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

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

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

Loading…
Cancel
Save