diff --git a/NXDNControl.cpp b/NXDNControl.cpp index edfedcb8f..3526c9dde 100644 --- a/NXDNControl.cpp +++ b/NXDNControl.cpp @@ -227,6 +227,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND); lich.encode(data + 2U); + lich.setDirection(NXDN_LICH_DIRECTION_INBOUND); netData[0U] = lich.getRaw(); CNXDNSACCH sacch; @@ -402,6 +403,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND); lich.encode(start + 2U); + lich.setDirection(NXDN_LICH_DIRECTION_INBOUND); netData[0U] = lich.getRaw(); CNXDNSACCH sacch; @@ -446,6 +448,7 @@ bool CNXDNControl::processVoice(unsigned char usc, unsigned char option, unsigne lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND); lich.encode(data + 2U); + lich.setDirection(NXDN_LICH_DIRECTION_INBOUND); netData[0U] = lich.getRaw(); // Regenerate SACCH if it's valid @@ -614,6 +617,7 @@ bool CNXDNControl::processData(unsigned char option, unsigned char *data) lich.setDirection(m_remoteGateway || !m_duplex ? NXDN_LICH_DIRECTION_INBOUND : NXDN_LICH_DIRECTION_OUTBOUND); lich.encode(data + 2U); + lich.setDirection(NXDN_LICH_DIRECTION_INBOUND); netData[0U] = lich.getRaw(); udch.getRaw(netData + 1U); diff --git a/NXDNLayer3.cpp b/NXDNLayer3.cpp index 21ffe0adf..e6e731a52 100644 --- a/NXDNLayer3.cpp +++ b/NXDNLayer3.cpp @@ -89,7 +89,7 @@ bool CNXDNLayer3::getIsGroup() const unsigned char CNXDNLayer3::getDataBlocks() const { - return m_data[8U] & 0x0FU; + return (m_data[8U] & 0x0FU) + 1U; } void CNXDNLayer3::getData(unsigned char* data) const