Skip to content

Commit 517d6a8

Browse files
committed
Cleanup the access control slightly.
1 parent a2522f8 commit 517d6a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

DMRAccessControl.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ void CDMRAccessControl::init(const std::vector<unsigned int>& blacklist, const s
4949
bool CDMRAccessControl::validateSrcId(unsigned int id)
5050
{
5151
if (m_selfOnly) {
52-
if (m_id > 9999999U) // Check that the Config DMR-ID is bigger than 7 digits
53-
return (id == m_id / 10U) || (id == m_id / 100U); // Does RF ID match Config ID / 10 or Config ID / 100
52+
if (m_id > 99999999U) // Check that the Config DMR-ID is bigger than 8 digits
53+
return id == m_id / 100U; // Does RF ID match Config ID / 100
54+
else if (m_id > 9999999U) // Check that the Config DMR-ID is bigger than 7 digits
55+
return id == m_id / 10U; // Does RF ID match Config ID / 10
5456
else
5557
return id == m_id;
5658
}

0 commit comments

Comments
 (0)