Cleanup the access control slightly.
This commit is contained in:
parent
a2522f8f32
commit
517d6a84f5
|
@ -49,8 +49,10 @@ void CDMRAccessControl::init(const std::vector<unsigned int>& blacklist, const s
|
||||||
bool CDMRAccessControl::validateSrcId(unsigned int id)
|
bool CDMRAccessControl::validateSrcId(unsigned int id)
|
||||||
{
|
{
|
||||||
if (m_selfOnly) {
|
if (m_selfOnly) {
|
||||||
if (m_id > 9999999U) // Check that the Config DMR-ID is bigger than 7 digits
|
if (m_id > 99999999U) // Check that the Config DMR-ID is bigger than 8 digits
|
||||||
return (id == m_id / 10U) || (id == m_id / 100U); // Does RF ID match Config ID / 10 or Config ID / 100
|
return id == m_id / 100U; // Does RF ID match Config ID / 100
|
||||||
|
else if (m_id > 9999999U) // Check that the Config DMR-ID is bigger than 7 digits
|
||||||
|
return id == m_id / 10U; // Does RF ID match Config ID / 10
|
||||||
else
|
else
|
||||||
return id == m_id;
|
return id == m_id;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue