|
|
|
@ -75,6 +75,10 @@ AffiliationLookup::~AffiliationLookup()
|
|
|
|
/// <param name="srcId"></param>
|
|
|
|
/// <param name="srcId"></param>
|
|
|
|
void AffiliationLookup::unitReg(uint32_t srcId)
|
|
|
|
void AffiliationLookup::unitReg(uint32_t srcId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isUnitReg(srcId)) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_unitRegTable.push_back(srcId);
|
|
|
|
m_unitRegTable.push_back(srcId);
|
|
|
|
|
|
|
|
|
|
|
|
if (m_verbose) {
|
|
|
|
if (m_verbose) {
|
|
|
|
@ -91,6 +95,10 @@ bool AffiliationLookup::unitDereg(uint32_t srcId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool ret = false;
|
|
|
|
bool ret = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isUnitReg(srcId)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_verbose) {
|
|
|
|
if (m_verbose) {
|
|
|
|
LogMessage(LOG_HOST, "%s, unit deregistration, srcId = %u",
|
|
|
|
LogMessage(LOG_HOST, "%s, unit deregistration, srcId = %u",
|
|
|
|
m_name, srcId);
|
|
|
|
m_name, srcId);
|
|
|
|
@ -131,6 +139,7 @@ bool AffiliationLookup::isUnitReg(uint32_t srcId) const
|
|
|
|
/// <param name="dstId"></param>
|
|
|
|
/// <param name="dstId"></param>
|
|
|
|
void AffiliationLookup::groupAff(uint32_t srcId, uint32_t dstId)
|
|
|
|
void AffiliationLookup::groupAff(uint32_t srcId, uint32_t dstId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!isGroupAff(srcId, dstId)) {
|
|
|
|
// update dynamic affiliation table
|
|
|
|
// update dynamic affiliation table
|
|
|
|
m_grpAffTable[srcId] = dstId;
|
|
|
|
m_grpAffTable[srcId] = dstId;
|
|
|
|
|
|
|
|
|
|
|
|
@ -139,6 +148,7 @@ void AffiliationLookup::groupAff(uint32_t srcId, uint32_t dstId)
|
|
|
|
m_name, srcId, dstId);
|
|
|
|
m_name, srcId, dstId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Helper to group unaffiliate a source ID.
|
|
|
|
/// Helper to group unaffiliate a source ID.
|
|
|
|
@ -154,7 +164,7 @@ bool AffiliationLookup::groupUnaff(uint32_t srcId)
|
|
|
|
m_name, srcId, tblDstId);
|
|
|
|
m_name, srcId, tblDstId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (...) {
|
|
|
|
} catch (...) {
|
|
|
|
/* stub */
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// remove dynamic affiliation table entry
|
|
|
|
// remove dynamic affiliation table entry
|
|
|
|
|