Skip to content

Commit

Permalink
NXDN: process SACCH message only if decode is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Jun 22, 2018
1 parent b4af024 commit dd7e4da
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions nxdn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,17 +718,18 @@ void DSDNXDN::processRTDCH(int index, unsigned char dibit)
{
m_sacch.unpuncture();

if (m_sacch.decode()) {
if (m_sacch.decode())
{
m_ran = m_sacch.getRAN();
}

if ((m_sacch.getCountdown() == 0) && (m_sacch.getDecodeCount() == 0))
{
m_currentMessage = m_sacch.getMessage();
m_messageType = m_currentMessage.getMessageType();
m_currentMessage.getSourceUnitId(m_sourceId);
m_currentMessage.getDestinationGroupId(m_destinationId);
m_currentMessage.isGroupCall(m_group);
if ((m_sacch.getCountdown() == 0) && (m_sacch.getDecodeCount() == 0))
{
m_currentMessage = m_sacch.getMessage();
m_messageType = m_currentMessage.getMessageType();
m_currentMessage.getSourceUnitId(m_sourceId);
m_currentMessage.getDestinationGroupId(m_destinationId);
m_currentMessage.isGroupCall(m_group);
}
}
}

Expand Down

0 comments on commit dd7e4da

Please sign in to comment.