mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Same for global_mutex_unlock
This commit is contained in:
@@ -183,6 +183,22 @@ int msr_global_mutex_lock(modsec_rec* msr, apr_global_mutex_t* lock, const char*
|
||||
if (rc != APR_SUCCESS) msr_log(msr, 1, "Audit log: Failed to lock global mutex: %s", get_apr_error(msr->mp, rc));
|
||||
return rc;
|
||||
}
|
||||
/**
|
||||
* handle errors from apr_global_mutex_unlock
|
||||
*/
|
||||
int msr_global_mutex_unlock(modsec_rec* msr, apr_global_mutex_t* lock, const char* fct) {
|
||||
assert(msr);
|
||||
assert(msr->modsecurity); // lock is msr->modsecurity->..._lock
|
||||
assert(msr->mp);
|
||||
if (!lock) {
|
||||
msr_log(msr, 1, "%s: Global mutex was not created", fct);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int rc = apr_global_mutex_unlock(msr->modsecurity->auditlog_lock);
|
||||
if (rc != APR_SUCCESS) msr_log(msr, 1, "Audit log: Failed to lock global mutex: %s", get_apr_error(msr->mp, rc));
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise the modsecurity engine. This function must be invoked
|
||||
|
Reference in New Issue
Block a user