1
0
Fork 0

Fix more issues with the reflector.

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

@ -203,8 +203,8 @@ void CYSFReflector::run()
LogMessage("Adding %s", rpt->m_callsign.c_str());
}
rpt->m_timer.start();
network.writePoll(address, port);
} else if (::memcmp(buffer + 0U, "YSFU", 4U) == 0) {
std::string callsign = std::string((char*)(buffer + 4U), 10U);
CYSFRepeater* rpt = findRepeater(address, port);
if (rpt != NULL) {
LogMessage("Removing %s (unlinked)", rpt->m_callsign.c_str());
@ -214,6 +214,8 @@ void CYSFReflector::run()
network.setCount(m_repeaters.size());
}
} else if (::memcmp(buffer + 0U, "YSFD", 4U) == 0) {
CYSFRepeater* rpt = findRepeater(address, port);
if (rpt != NULL) {
if (!watchdogTimer.isRunning()) {
::memcpy(tag, buffer + 4U, YSF_CALLSIGN_LENGTH);
@ -247,8 +249,6 @@ void CYSFReflector::run()
}
}
// Only accept transmission from an already accepted repeater
if (::memcmp(tag, buffer + 4U, YSF_CALLSIGN_LENGTH) == 0) {
watchdogTimer.start();
for (std::vector<CYSFRepeater*>::const_iterator it = m_repeaters.begin(); it != m_repeaters.end(); ++it) {

Loading…
Cancel
Save