mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
fix: add error logging
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
This commit is contained in:
parent
e9d0150102
commit
54f531efd7
@ -131,6 +131,7 @@ int acquire_global_lock(apr_global_mutex_t *lock, apr_pool_t *mp) {
|
||||
// get platform temp dir
|
||||
rc = apr_temp_dir_get(&temp_dir, mp);
|
||||
if (rc != APR_SUCCESS) {
|
||||
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, NULL, "ModSecurity: Could not get temp dir");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -139,6 +140,7 @@ int acquire_global_lock(apr_global_mutex_t *lock, apr_pool_t *mp) {
|
||||
|
||||
rc = apr_file_mktemp(&lock_name, path, 0, mp);
|
||||
if (rc != APR_SUCCESS) {
|
||||
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, NULL, " ModSecurity: Could not create temporary file for global lock");
|
||||
return -1;
|
||||
}
|
||||
// below func always return APR_SUCCESS
|
||||
@ -146,6 +148,7 @@ int acquire_global_lock(apr_global_mutex_t *lock, apr_pool_t *mp) {
|
||||
|
||||
rc = apr_global_mutex_create(&lock, filename, APR_LOCK_DEFAULT, mp);
|
||||
if (rc != APR_SUCCESS) {
|
||||
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, NULL, " ModSecurity: Could not create global mutex");
|
||||
return -1;
|
||||
}
|
||||
return APR_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user