Skip to content

Commit

Permalink
add support to decode LC_CALL_TERM when DVM is used in some reverse r…
Browse files Browse the repository at this point in the history
…epeater situations;
  • Loading branch information
gatekeep committed Feb 8, 2025
1 parent 8e7c343 commit e88a3a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/common/p25/lc/tdulc/LC_CALL_TERM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* GPLv2 Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright (C) 2022,2024 Bryan Biedenkapp, N2PLL
* Copyright (C) 2022,2024,2025 Bryan Biedenkapp, N2PLL
*
*/
#include "Defines.h"
Expand Down Expand Up @@ -34,7 +34,17 @@ bool LC_CALL_TERM::decode(const uint8_t* data)
{
assert(data != nullptr);

/* stub */
uint8_t rs[P25_TDULC_LENGTH_BYTES + 1U];
::memset(rs, 0x00U, P25_TDULC_LENGTH_BYTES);

bool ret = TDULC::decode(data, rs);
if (!ret)
return false;

ulong64_t rsValue = TDULC::toValue(rs);

m_implicit = true;
m_dstId = (uint32_t)(rsValue & 0xFFFFFFU); // Target Address

return true;
}
Expand Down
2 changes: 2 additions & 0 deletions src/common/p25/lc/tdulc/TDULCFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ std::unique_ptr<TDULC> TDULCFactory::createTDULC(const uint8_t* data)
return decode(new LC_PRIVATE(), data);
case LCO::TEL_INT_VCH_USER:
return decode(new LC_TEL_INT_VCH_USER(), data);
case LCO::CALL_TERM:
return decode(new LC_CALL_TERM(), data);
default:
LogError(LOG_P25, "TDULCFactory::create(), unknown TDULC LCO value, lco = $%02X", lco);
break;
Expand Down

0 comments on commit e88a3a0

Please # to comment.