mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Removes reference counter from audit_log writer
This commit is contained in:
parent
4b88fdc513
commit
f2f5c9c958
@ -42,8 +42,7 @@ namespace writer {
|
||||
class Writer {
|
||||
public:
|
||||
explicit Writer(AuditLog *audit)
|
||||
: m_audit(audit),
|
||||
m_refereceCount(1) { }
|
||||
: m_audit(audit) { }
|
||||
|
||||
virtual ~Writer() { }
|
||||
|
||||
@ -53,23 +52,8 @@ class Writer {
|
||||
|
||||
static void generateBoundary(std::string *boundary);
|
||||
|
||||
void refCountIncrease() {
|
||||
m_refereceCount++;
|
||||
}
|
||||
|
||||
|
||||
bool refCountDecreaseAndCheck() {
|
||||
m_refereceCount--;
|
||||
if (m_refereceCount == 0) {
|
||||
delete this;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
AuditLog *m_audit;
|
||||
int m_refereceCount;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user