fix(reflector): gate monitor TG UDP delivery on selected TG idle
Adds ReflectorClient::SelectedTgIdleFilter and wraps the TgMonitorFilter
arm at the seven UDP fanout sites that a661879 (v1.3.10) added it to.
Monitor-TG UDP audio is now delivered to a client only when its selected
TG has no active local or trunk talker; passive observers (currentTG=0)
keep receiving monitor UDP via a tg==0 short-circuit. svxlink's TCP
TalkerStart path and ++/+/plain priority logic are untouched.
Restores the pre-v1.3.10 single-TG-at-a-time invariant for selected-TG
clients while keeping test_39 (passive multi-hop) green. Adds test_40
(monitor-TG mixing regression), test_41 (priority switch via MsgSelectTG),
test_42 (passive observer sanity).
This commit is contained in:
1 parent
36d49fbbd6
commit
dc3a8c018c
7 files changed
+153
-9
No files matched your search
@@ -184,6 +184,19 @@ bool ReflectorClient::TgFilter::operator()(ReflectorClient* client) const
|
||||
}
|
||||
|
||||
|
||||
bool ReflectorClient::SelectedTgIdleFilter::operator()(
|
||||
ReflectorClient* client) const
|
||||
{
|
||||
uint32_t tg = client->m_current_tg;
|
||||
if (tg == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return TGHandler::instance()->talkerForTG(tg) == nullptr
|
||||
&& !TGHandler::instance()->hasTrunkTalker(tg);
|
||||
} /* ReflectorClient::SelectedTgIdleFilter::operator() */
|
||||
|
||||
|
||||
ReflectorClient::ReflectorClient(Reflector *ref, Async::FramedTcpConnection *con,
|
||||
Async::Config *cfg)
|
||||
: m_con(con), m_con_state(STATE_EXPECT_PROTO_VER),
|
||||
|
||||
Reference in new issue
Block a user