From 054e015ded872a86b3b21c147d29826cd4f13d70 Mon Sep 17 00:00:00 2001 From: brenosilva Date: Wed, 22 Aug 2012 14:25:09 +0000 Subject: [PATCH] Fix compilation issues in api.c --- standalone/api.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/standalone/api.c b/standalone/api.c index aad68bea..b234fd38 100644 --- a/standalone/api.c +++ b/standalone/api.c @@ -119,7 +119,9 @@ server_rec *modsecInit() { server->limit_req_fields = 1024; server->limit_req_fieldsize = 1024; server->limit_req_line = 1024; +#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3 server->loglevel = APLOG_DEBUG; +#endif server->lookup_defaults = NULL; server->module_config = NULL; server->names = NULL; @@ -268,9 +270,14 @@ conn_rec *modsecNewConnection() { c->local_host = sa_name; c->local_ip = "127.0.0.1"; c->pool = pc; - c->remote_addr = server->addrs->host_addr; c->remote_host = sa_name; +#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3 c->remote_ip = "127.0.0.1"; + c->remote_addr = server->addrs->host_addr; +#else + c->client_ip = "127.0.0.1"; + c->client_addr = server->addrs->host_addr; +#endif c->input_filters = NULL; c->output_filters = NULL; c->bucket_alloc = apr_bucket_alloc_create(pc);