Skip to content

Commit d05a593

Browse files
committed
BUGFIX: when bridge is receiving local or UDP audio, ignore all FNE network traffic in its entirety (this has the affect of making local audio and UDP audio priority over FNE audio);
1 parent 360fcac commit d05a593

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

src/bridge/HostBridge.Analog.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ void HostBridge::processAnalogNetwork(uint8_t* buffer, uint32_t length)
7474
LogDebug(LOG_NET, "Analog, seqNo = %u, srcId = %u, dstId = %u, len = %u", seqNo, srcId, dstId, length);
7575
}
7676

77+
// ignore network traffic entirely when local audio detect or
78+
// traffic from UDP is running
79+
if (m_audioDetect || m_trafficFromUDP)
80+
return;
81+
7782
if (!individual) {
7883
if (srcId == 0)
7984
return;

src/bridge/HostBridge.DMR.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ void HostBridge::processDMRNetwork(uint8_t* buffer, uint32_t length)
122122
::memcpy(data.get(), buffer + 20U, DMR_FRAME_LENGTH_BYTES);
123123
}
124124

125+
// ignore network traffic entirely when local audio detect or
126+
// traffic from UDP is running
127+
if (m_audioDetect || m_trafficFromUDP)
128+
return;
129+
125130
if (flco == FLCO::GROUP) {
126131
if (srcId == 0) {
127132
m_network->resetDMR(slotNo);

src/bridge/HostBridge.P25.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ void HostBridge::processP25Network(uint8_t* buffer, uint32_t length)
124124
lsd.setLSD1(lsd1);
125125
lsd.setLSD2(lsd2);
126126

127+
// ignore network traffic entirely when local audio detect or
128+
// traffic from UDP is running
129+
if (m_audioDetect || m_trafficFromUDP)
130+
return;
131+
127132
if (control.getLCO() == LCO::GROUP) {
128133
if ((duid == DUID::TDU) || (duid == DUID::TDULC)) {
129-
// ignore TDU/TDULC entirely when local audio detect or
130-
// traffic from UDP is running
131-
if (m_audioDetect || m_trafficFromUDP)
132-
return;
133-
134134
// ignore TDU's that are grant demands
135135
if (grantDemand) {
136136
m_network->resetP25();

0 commit comments

Comments
 (0)