Require matching trunk section names and cap audio debug at 500 frames

Trunk link matching now requires the peer's hello ID (section name) to
match the local [TRUNK_x] section name. Both sides of a trunk link must
use the same section name, agreed upon by both sysops. This replaces
the previous matching by secret+prefix only.

BREAKING CHANGE: existing deployments must rename their [TRUNK_x]
sections so both sides use the same name for each link.

Also cap TRUNK_DEBUG audio frame logging at 500 frames per trunk link
to prevent excessive log output during sustained transmissions.
This commit is contained in:
Audric committed 2026-04-05 18:22:04 +02:00
1 parent 638d3c527e
commit 05c4c88ff3
6 files changed
+59 -20

No files matched your search

+19 -2
View File
@@ -563,8 +563,25 @@ void TrunkLink::onFrameReceived(FramedTcpConnection* con,
if (m_debug && header.type() != MsgTrunkHeartbeat::TYPE)
{
cout << m_section << " [DEBUG]: rx " << (is_inbound ? "IB" : "OB")
<< " type=" << header.type() << " len=" << data.size() << endl;
if (header.type() == MsgTrunkAudio::TYPE ||
header.type() == MsgTrunkFlush::TYPE)
{
if (m_debug_frame_cnt < 500)
{
cout << m_section << " [DEBUG]: rx " << (is_inbound ? "IB" : "OB")
<< " type=" << header.type() << " len=" << data.size() << endl;
if (++m_debug_frame_cnt == 500)
{
cout << m_section << " [DEBUG]: audio frame log limit reached (500)"
<< " — suppressing further audio/flush debug" << endl;
}
}
}
else
{
cout << m_section << " [DEBUG]: rx " << (is_inbound ? "IB" : "OB")
<< " type=" << header.type() << " len=" << data.size() << endl;
}
}
switch (header.type())