You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by du...@apache.org on 2008/01/19 18:32:23 UTC

svn commit: r613429 - /webservices/axis2/trunk/c/src/core/transport/http/server/apache2/apache2_worker.c

Author: dumindu
Date: Sat Jan 19 09:32:17 2008
New Revision: 613429

URL: http://svn.apache.org/viewvc?rev=613429&view=rev
Log:
Jira AXIS2C-923. Added peer ip address to the msg_ctx when deployed with mod_axis2.


Modified:
    webservices/axis2/trunk/c/src/core/transport/http/server/apache2/apache2_worker.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/server/apache2/apache2_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/server/apache2/apache2_worker.c?rev=613429&r1=613428&r2=613429&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/server/apache2/apache2_worker.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/server/apache2/apache2_worker.c Sat Jan 19 09:32:17 2008
@@ -164,6 +164,8 @@
     axis2_http_out_transport_info_t *apache2_out_transport_info = NULL;
     axis2_char_t *ctx_uuid = NULL;
     axis2_op_ctx_t *op_ctx = NULL;
+    axis2_char_t *peer_ip = NULL;
+    axutil_property_t *peer_property = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_CRITICAL_FAILURE);
     AXIS2_PARAM_CHECK(env->error, request, AXIS2_CRITICAL_FAILURE);
@@ -210,6 +212,17 @@
 
     msg_ctx = axis2_msg_ctx_create(env, conf_ctx, in_desc, out_desc);
     axis2_msg_ctx_set_server_side(msg_ctx, env, AXIS2_TRUE);
+
+    peer_ip = request->connection->remote_ip;
+    
+    if (peer_ip)
+    {
+        peer_property = axutil_property_create(env);
+        axutil_property_set_value(peer_property, env,
+                                  axutil_strdup(env, peer_ip));
+        axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_SVR_PEER_IP_ADDR,
+                                   peer_property);
+    }
 
     axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org