wso2-wsf-cpp/2.4_client_ip_API_change.patch
2012-07-12 13:10:32 -04:00

16 lines
755 B
Diff

diff --git a/wsf_c/axis2c/src/core/transport/http/server/apache2/apache2_worker.c b/wsf_c/axis2c/src/core/transport/http/server/apache2/apache2_worker.c
index dac9c4e..e92fca6 100644
--- a/wsf_c/axis2c/src/core/transport/http/server/apache2/apache2_worker.c
+++ b/wsf_c/axis2c/src/core/transport/http/server/apache2/apache2_worker.c
@@ -266,7 +266,11 @@ axis2_apache2_worker_process_request(
out_stream = axutil_stream_create_basic(env);
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Client HTTP version %s", http_version);
+ #if AP_SERVER_MAJORVERSION_NUMBER >= 2 && AP_SERVER_MINORVERSION_NUMBER > 2
+ peer_ip = request->connection->client_ip;
+ #else
peer_ip = request->connection->remote_ip;
+ #endif
if(peer_ip)
{