Refactoring on the audit logs implementation

Among of other things, it is now supporting shared file locks between
different process.
This commit is contained in:
Felipe Zimmerle
2016-12-14 10:09:53 -03:00
parent 9707d46e45
commit 2e9a35c358
24 changed files with 661 additions and 260 deletions

View File

@@ -97,10 +97,7 @@ Rules::~Rules() {
tmp->pop_back();
}
}
/** Cleanup audit log */
if (m_auditLog) {
m_auditLog->refCountDecreaseAndCheck();
}
free(unicode_map_table);
}
@@ -250,17 +247,6 @@ int Rules::merge(Driver *from) {
dynamic_cast<RulesProperties *>(this),
&m_parserError);
if (from->m_auditLog != NULL && this->m_auditLog != NULL) {
this->m_auditLog->refCountDecreaseAndCheck();
}
if (from->m_auditLog) {
this->m_auditLog = from->m_auditLog;
}
if (this->m_auditLog != NULL) {
this->m_auditLog->refCountIncrease();
}
return amount_of_rules;
}
@@ -272,16 +258,6 @@ int Rules::merge(Rules *from) {
dynamic_cast<RulesProperties *>(this),
&m_parserError);
if (from->m_auditLog != NULL && this->m_auditLog != NULL) {
this->m_auditLog->refCountDecreaseAndCheck();
}
if (from->m_auditLog) {
this->m_auditLog = from->m_auditLog;
}
if (this->m_auditLog != NULL) {
this->m_auditLog->refCountIncrease();
}
return amount_of_rules;
}