diff --git a/lookups/AffiliationLookup.cpp b/lookups/AffiliationLookup.cpp index f4651fd5..e7903ca6 100644 --- a/lookups/AffiliationLookup.cpp +++ b/lookups/AffiliationLookup.cpp @@ -76,6 +76,11 @@ AffiliationLookup::~AffiliationLookup() void AffiliationLookup::unitReg(uint32_t srcId) { m_unitRegTable.push_back(srcId); + + if (m_verbose) { + LogMessage(LOG_HOST, "%s, unit registration, srcId = %u", + m_name, srcId); + } } /// @@ -85,7 +90,12 @@ void AffiliationLookup::unitReg(uint32_t srcId) bool AffiliationLookup::unitDereg(uint32_t srcId) { bool ret = false; - + + if (m_verbose) { + LogMessage(LOG_HOST, "%s, unit deregistration, srcId = %u", + m_name, srcId); + } + groupUnaff(srcId); // remove dynamic unit registration table entry @@ -123,6 +133,11 @@ void AffiliationLookup::groupAff(uint32_t srcId, uint32_t dstId) { // update dynamic affiliation table m_grpAffTable[srcId] = dstId; + + if (m_verbose) { + LogMessage(LOG_HOST, "%s, group affiliation, srcId = %u, dstId = %u", + m_name, srcId, dstId); + } } /// @@ -131,6 +146,17 @@ void AffiliationLookup::groupAff(uint32_t srcId, uint32_t dstId) /// bool AffiliationLookup::groupUnaff(uint32_t srcId) { + // lookup dynamic affiliation table entry + try { + uint32_t tblDstId = m_grpAffTable.at(srcId); + if (m_verbose) { + LogMessage(LOG_HOST, "%s, group unaffiliation, srcId = %u, dstId = %u", + m_name, srcId, tblDstId); + } + } catch (...) { + /* stub */ + } + // remove dynamic affiliation table entry try { m_grpAffTable.at(srcId); @@ -223,6 +249,11 @@ bool AffiliationLookup::grantCh(uint32_t dstId, uint32_t grantTimeout) m_grantTimers[dstId] = Timer(1000U, grantTimeout); m_grantTimers[dstId].start(); + if (m_verbose) { + LogMessage(LOG_HOST, "%s, granting channel, chNo = %u, dstId = %u", + m_name, chNo, dstId); + } + return true; } diff --git a/p25/lookups/P25AffiliationLookup.cpp b/p25/lookups/P25AffiliationLookup.cpp index 5eb3f78f..c08cd3ea 100644 --- a/p25/lookups/P25AffiliationLookup.cpp +++ b/p25/lookups/P25AffiliationLookup.cpp @@ -44,7 +44,7 @@ using namespace p25::lookups; /// /// Name of lookup table. /// Flag indicating whether verbose logging is enabled. -P25AffiliationLookup::P25AffiliationLookup(Control* p25, bool verbose) : ::lookups::AffiliationLookup("P25 Aff", verbose), +P25AffiliationLookup::P25AffiliationLookup(Control* p25, bool verbose) : ::lookups::AffiliationLookup("P25 Affiliation", verbose), m_p25(p25) { /* stub */