From 0ebd3f7c792fe67ec91ba2413dd14e5a190ac061 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Fri, 1 Dec 2023 12:44:16 -0500 Subject: [PATCH] fix bad TSBK layout (this looks like a poor copy and paste job); --- src/p25/lc/tsbk/ISP_AUTH_RESP.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/p25/lc/tsbk/ISP_AUTH_RESP.cpp b/src/p25/lc/tsbk/ISP_AUTH_RESP.cpp index 7c362c5a..e55904f7 100644 --- a/src/p25/lc/tsbk/ISP_AUTH_RESP.cpp +++ b/src/p25/lc/tsbk/ISP_AUTH_RESP.cpp @@ -82,10 +82,12 @@ bool ISP_AUTH_RESP::decode(const uint8_t* data, bool rawTSBK) ulong64_t tsbkValue = TSBK::toValue(tsbk); - m_aivFlag = (((tsbkValue >> 56) & 0xFFU) & 0x80U) == 0x80U; // Additional Info. Flag - m_service = (uint8_t)((tsbkValue >> 56) & 0x3FU); // Service Type - m_response = (uint8_t)((tsbkValue >> 48) & 0xFFU); // Reason - m_dstId = (uint32_t)((tsbkValue >> 24) & 0xFFFFFFU); // Target Radio Address + m_authStandalone = (((tsbkValue >> 56) & 0xFFU) & 0x01U) == 0x01U; // Authentication Standalone Flag + m_authRes[3U] = tsbk[3U]; // RES1(3) + m_authRes[2U] = tsbk[4U]; // RES1(2) + m_authRes[1U] = tsbk[5U]; // RES1(1) + m_authRes[0U] = tsbk[6U]; // RES1(0) + m_srcId = (uint32_t)(tsbkValue & 0xFFFFFFU); // Source Radio Address return true;