Add optional repeater network debugging.

This commit is contained in:
Jonathan Naylor 2018-03-14 22:06:07 +00:00
parent af5a99ef0a
commit 60352ec830
4 changed files with 9 additions and 8 deletions

View File

@ -42,7 +42,7 @@ m_rptAddress(),
m_rptPort(0U),
m_myAddress(),
m_myPort(0U),
m_announcements(true),
m_rptDebug(false),
m_daemon(false),
m_lookupName(),
m_lookupTime(0U),
@ -118,8 +118,8 @@ bool CConf::read()
m_myAddress = value;
else if (::strcmp(key, "LocalPort") == 0)
m_myPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "Announcements") == 0)
m_announcements = ::atoi(value) == 1;
else if (::strcmp(key, "Debug") == 0)
m_rptDebug = ::atoi(value) == 1;
else if (::strcmp(key, "Daemon") == 0)
m_daemon = ::atoi(value) == 1;
} else if (section == SECTION_ID_LOOKUP) {
@ -191,9 +191,9 @@ unsigned int CConf::getMyPort() const
return m_myPort;
}
bool CConf::getAnnouncements() const
bool CConf::getRptDebug() const
{
return m_announcements;
return m_rptDebug;
}
bool CConf::getDaemon() const

View File

@ -36,7 +36,7 @@ public:
unsigned int getRptPort() const;
std::string getMyAddress() const;
unsigned int getMyPort() const;
bool getAnnouncements() const;
bool getRptDebug() const;
bool getDaemon() const;
// The Id Lookup section
@ -70,7 +70,7 @@ private:
unsigned int m_rptPort;
std::string m_myAddress;
unsigned int m_myPort;
bool m_announcements;
bool m_rptDebug;
bool m_daemon;
std::string m_lookupName;

View File

@ -161,7 +161,7 @@ void CNXDNGateway::run()
}
#endif
CIcomNetwork localNetwork(m_conf.getMyAddress(), m_conf.getMyPort(), m_conf.getRptAddress(), m_conf.getRptPort(), false);
CIcomNetwork localNetwork(m_conf.getMyAddress(), m_conf.getMyPort(), m_conf.getRptAddress(), m_conf.getRptPort(), m_conf.getRptDebug());
ret = localNetwork.open();
if (!ret) {
::LogFinalise();

View File

@ -4,6 +4,7 @@ RptAddress=127.0.0.1
RptPort=14021
LocalAddress=127.0.0.1
LocalPort=14020
Debug=0
Daemon=1
[Voice]