From e1e43cfa1551d9480e815a43714b07ba8d178cf0 Mon Sep 17 00:00:00 2001 From: brenosilva Date: Mon, 19 Dec 2011 14:28:42 +0000 Subject: [PATCH] Fixed new apache API --- apache2/apache2_util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apache2/apache2_util.c b/apache2/apache2_util.c index 219fbac1..760fbdc6 100644 --- a/apache2/apache2_util.c +++ b/apache2/apache2_util.c @@ -263,9 +263,15 @@ static void internal_log_ex(request_rec *r, directory_config *dcfg, modsec_rec * } else hostname = ""; +#if AP_SERVER_MINORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2 + ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, + "[client %s] ModSecurity: %s%s [uri \"%s\"]%s", r->connection->client_ip, str1, + hostname, log_escape(msr->mp, r->uri), unique_id); +#else ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server, "[client %s] ModSecurity: %s%s [uri \"%s\"]%s", r->connection->remote_ip, str1, hostname, log_escape(msr->mp, r->uri), unique_id); +#endif /* Add this message to the list. */ if (msr != NULL) {