You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by da...@apache.org on 2010/03/02 00:37:45 UTC

svn commit: r917798 - /axis/axis2/c/core/trunk/src/core/transport/http/receiver/http_receiver.c

Author: damitha
Date: Mon Mar  1 23:37:44 2010
New Revision: 917798

URL: http://svn.apache.org/viewvc?rev=917798&view=rev
Log:
Add modification to axis2_http_server_get_epr_for_service so that if service name is not passed
it will just return the server name with ip

Modified:
    axis/axis2/c/core/trunk/src/core/transport/http/receiver/http_receiver.c

Modified: axis/axis2/c/core/trunk/src/core/transport/http/receiver/http_receiver.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/transport/http/receiver/http_receiver.c?rev=917798&r1=917797&r2=917798&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/transport/http/receiver/http_receiver.c (original)
+++ axis/axis2/c/core/trunk/src/core/transport/http/receiver/http_receiver.c Mon Mar  1 23:37:44 2010
@@ -400,6 +400,10 @@
     return epr;
 }
 
+/** 
+ * If service name is set then this will return epr path for service. Otherwise it will return 
+ * server name
+ */
 static axis2_endpoint_ref_t *AXIS2_CALL
 axis2_http_server_get_epr_for_service(
     axis2_transport_receiver_t * server,
@@ -418,12 +422,18 @@
 	{
 	    host_address = AXIS2_DEFAULT_HOST_ADDRESS; /* TODO : get from axis2.xml */
 	}
-	svc_path = axutil_stracat(env, AXIS2_DEFAULT_SVC_PATH, svc_name);
+    if(svc_name)
+    {
+	    svc_path = axutil_stracat(env, AXIS2_DEFAULT_SVC_PATH, svc_name);
+    }
     
 	url = axutil_url_create(env, AXIS2_HTTP_PROTOCOL, host_address,
         AXIS2_INTF_TO_IMPL(server)->port, svc_path);
-		
-    AXIS2_FREE(env->allocator, svc_path);
+
+    if(svc_path)
+    {
+        AXIS2_FREE(env->allocator, svc_path);
+    }
     if(!url)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Cannot create reply to epr for service %s.",