diff --git a/apache2/apache2_util.c b/apache2/apache2_util.c index c3fd10cc..e4bbcdb1 100644 --- a/apache2/apache2_util.c +++ b/apache2/apache2_util.c @@ -328,7 +328,7 @@ void msr_log_warn(modsec_rec *msr, const char *text, ...) { /** * Converts an Apache error log message into one line of text. */ -char *format_error_log_message(apr_pool_t *mp, error_message *em) { +char *format_error_log_message(apr_pool_t *mp, error_message_t *em) { char *s_file = "", *s_line = "", *s_level = ""; char *s_status = "", *s_message = ""; char *msg = NULL; diff --git a/apache2/mod_security2.c b/apache2/mod_security2.c index 1a95e1d1..9e29d6b9 100644 --- a/apache2/mod_security2.c +++ b/apache2/mod_security2.c @@ -457,7 +457,7 @@ static modsec_rec *create_tx_context(request_rec *r) { } /* Populate tx fields */ - msr->error_messages = apr_array_make(msr->mp, 5, sizeof(error_message *)); + msr->error_messages = apr_array_make(msr->mp, 5, sizeof(error_message_t *)); msr->alerts = apr_array_make(msr->mp, 5, sizeof(char *)); msr->server_software = real_server_signature; @@ -964,7 +964,7 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s #endif { modsec_rec *msr = NULL; - error_message *em = NULL; + error_message_t *em = NULL; #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2 if (info == NULL) return; @@ -1007,7 +1007,7 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s if (msr == NULL) return; /* Store the error message for later */ - em = (error_message *)apr_pcalloc(msr->mp, sizeof(error_message)); + em = (error_message_t *)apr_pcalloc(msr->mp, sizeof(error_message_t)); if (em == NULL) return; #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2 @@ -1035,7 +1035,7 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s } } - *(const error_message **)apr_array_push(msr->error_messages) = em; + *(const error_message_t **)apr_array_push(msr->error_messages) = em; } diff --git a/apache2/modsecurity.h b/apache2/modsecurity.h index bcbfec8b..593773ab 100644 --- a/apache2/modsecurity.h +++ b/apache2/modsecurity.h @@ -26,7 +26,7 @@ typedef struct rule_exception rule_exception; typedef struct rule_exception encryption_method; typedef struct modsec_rec modsec_rec; typedef struct directory_config directory_config; -typedef struct error_message error_message; +typedef struct error_message_t error_message_t; typedef struct msc_engine msc_engine; typedef struct msc_data_chunk msc_data_chunk; typedef struct msc_arg msc_arg; @@ -590,7 +590,7 @@ struct directory_config { int crypto_hash_framesrc_pm; }; -struct error_message { +struct error_message_t { const char *file; int line; int level; diff --git a/apache2/msc_logging.c b/apache2/msc_logging.c index 896a3dd5..8b560d4b 100644 --- a/apache2/msc_logging.c +++ b/apache2/msc_logging.c @@ -930,7 +930,7 @@ void sec_audit_logger(modsec_rec *msr) { /* Apache error messages */ for(i = 0; i < msr->error_messages->nelts; i++) { - error_message *em = (((error_message**)msr->error_messages->elts)[i]); + error_message_t *em = (((error_message_t **)msr->error_messages->elts)[i]); text = apr_psprintf(msr->mp, "Apache-Error: %s\n", format_error_log_message(msr->mp, em)); sec_auditlog_write(msr, text, strlen(text)); diff --git a/apache2/re_variables.c b/apache2/re_variables.c index e2956f16..80f40f5b 100644 --- a/apache2/re_variables.c +++ b/apache2/re_variables.c @@ -670,7 +670,7 @@ static int var_webserver_error_log_generate(modsec_rec *msr, msre_var *var, msre int i, count = 0; for(i = 0; i < msr->error_messages->nelts; i++) { - error_message *em = (((error_message**)msr->error_messages->elts)[i]); + error_message_t *em = (((error_message_t **)msr->error_messages->elts)[i]); char *fem = NULL; fem = format_error_log_message(mptmp, em);