|
|
|
@ -200,12 +200,16 @@ void CYSFReflector::run()
|
|
|
|
|
unsigned char dst[YSF_CALLSIGN_LENGTH];
|
|
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
|
bool blocked;
|
|
|
|
|
|
|
|
|
|
unsigned char buffer[200U];
|
|
|
|
|
sockaddr_storage addr;
|
|
|
|
|
unsigned int addrLen;
|
|
|
|
|
|
|
|
|
|
unsigned int len = network.readData(buffer, 200U, addr, addrLen);
|
|
|
|
|
if (len > 0U) {
|
|
|
|
|
blocked = false;
|
|
|
|
|
|
|
|
|
|
CYSFRepeater* rpt = findRepeater(addr);
|
|
|
|
|
if (::memcmp(buffer, "YSFP", 4U) == 0) {
|
|
|
|
|
if (rpt == NULL) {
|
|
|
|
@ -271,8 +275,10 @@ void CYSFReflector::run()
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
LogDebug("Data from %10.10s at %10.10s blocked", buffer + 14U, buffer + 4U);
|
|
|
|
|
blocked = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!blocked) {
|
|
|
|
|
watchdogTimer.start();
|
|
|
|
|
|
|
|
|
|
for (std::vector<CYSFRepeater*>::const_iterator it = m_repeaters.begin(); it != m_repeaters.end(); ++it) {
|
|
|
|
@ -286,6 +292,7 @@ void CYSFReflector::run()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsigned int ms = stopWatch.elapsed();
|
|
|
|
|
stopWatch.start();
|
|
|
|
|