mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
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:
26
src/rules.cc
26
src/rules.cc
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user