axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r373977 - in /webservices/axis2/trunk/c: ./ include/ modules/core/deployment/ modules/core/description/ samples/ samples/client/ samples/server/ test/ test/client/ test/core/clientapi/ test/server/
Date Wed, 01 Feb 2006 03:39:17 GMT
Author: damitha
Date: Tue Jan 31 19:39:00 2006
New Revision: 373977

URL: http://svn.apache.org/viewcvs?rev=373977&view=rev
Log:
Moved server and client sample from test to samples.
Fixed a memeory leak in deployment module


Added:
    webservices/axis2/trunk/c/samples/
    webservices/axis2/trunk/c/samples/client/
      - copied from r373972, webservices/axis2/trunk/c/test/client/
    webservices/axis2/trunk/c/samples/server/
      - copied from r373972, webservices/axis2/trunk/c/test/server/
Removed:
    webservices/axis2/trunk/c/test/client/
    webservices/axis2/trunk/c/test/server/
Modified:
    webservices/axis2/trunk/c/configure.ac
    webservices/axis2/trunk/c/include/axis2_dll_desc.h
    webservices/axis2/trunk/c/include/axis2_param.h
    webservices/axis2/trunk/c/include/axis2_param_container.h
    webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
    webservices/axis2/trunk/c/modules/core/description/dll_desc.c
    webservices/axis2/trunk/c/modules/core/description/param.c
    webservices/axis2/trunk/c/test/Makefile.am
    webservices/axis2/trunk/c/test/core/clientapi/Makefile.am

Modified: webservices/axis2/trunk/c/configure.ac
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/configure.ac?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/configure.ac (original)
+++ webservices/axis2/trunk/c/configure.ac Tue Jan 31 19:39:00 2006
@@ -111,13 +111,14 @@
     modules/util/Makefile \
     modules/platforms/unix/Makefile \
     modules/wsdl/Makefile \
+    samples/Makefile \
+    samples/server/Makefile \
+    samples/server/echo/Makefile \
+    samples/server/math/Makefile \
+    samples/client/Makefile \
+    samples/client/echo/Makefile \
+    samples/client/math/Makefile \
     test/Makefile \
-    test/server/Makefile \
-    test/server/echo/Makefile \
-    test/server/math/Makefile \
-    test/client/Makefile \
-    test/client/echo/Makefile \
-    test/client/math/Makefile \
     test/xml/Makefile \
     test/xml/om/Makefile \
     test/xml/soap/Makefile \

Modified: webservices/axis2/trunk/c/include/axis2_dll_desc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_dll_desc.h?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_dll_desc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_dll_desc.h Tue Jan 31 19:39:00 2006
@@ -159,6 +159,12 @@
 AXIS2_DECLARE(axis2_dll_desc_t*) 
 axis2_dll_desc_create(axis2_env_t **env);
 
+AXIS2_DECLARE(axis2_status_t)
+axis2_dll_desc_as_param_value_free (void *as_param_value,
+                                    axis2_env_t **env);
+
+/******************************************************************************/
+
 #define AXIS2_DLL_DESC_FREE(dll_desc, env) \
     ((dll_desc)->ops->free(dll_desc, env))
 

Modified: webservices/axis2/trunk/c/include/axis2_param.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_param.h?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_param.h (original)
+++ webservices/axis2/trunk/c/include/axis2_param.h Tue Jan 31 19:39:00 2006
@@ -141,6 +141,10 @@
          
      axis2_status_t (AXIS2_CALL *free)(struct axis2_param *param, 
 	 									axis2_env_t **env);
+     
+    axis2_status_t (AXIS2_CALL *
+    value_free) (void *param_value, 
+                            axis2_env_t **env);
 }axis2_param_ops_t;
  
 /** 

Modified: webservices/axis2/trunk/c/include/axis2_param_container.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_param_container.h?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_param_container.h (original)
+++ webservices/axis2/trunk/c/include/axis2_param_container.h Tue Jan 31 19:39:00 2006
@@ -42,6 +42,13 @@
 
 struct axis2_param_container;
 struct axis2_param_container_ops;
+ 
+/**
+ * each type which is passed as a param value to a parameter, must have this 
+ * type of function implemented. When the param value is set this function  
+ * should also be assigned to param free function
+ */
+typedef axis2_status_t (*AXIS2_PARAM_VALUE_FREE) (void *param, axis2_env_t **env);    
 
 /** @defgroup axis2_param_container Parameter Container
  * @ingroup axis2_description

Modified: webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c Tue Jan 31 19:39:00 2006
@@ -370,6 +370,7 @@
     
     AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_SVC_DLL);
     status = AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc);
+    impl_info_param->ops->value_free = axis2_dll_desc_as_param_value_free;
     if(AXIS2_SUCCESS != status)
     {
         return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/modules/core/description/dll_desc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/dll_desc.c?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/dll_desc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/dll_desc.c Tue Jan 31 19:39:00 2006
@@ -203,6 +203,17 @@
 }
 
 axis2_status_t AXIS2_CALL
+axis2_dll_desc_as_param_value_free (void *as_param_value,
+                                    axis2_env_t **env)
+{
+    axis2_dll_desc_t *dll_desc = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    dll_desc = (axis2_dll_desc_t *) as_param_value;
+    return axis2_dll_desc_free(dll_desc, env);
+}
+
+axis2_status_t AXIS2_CALL
 axis2_dll_desc_set_name(axis2_dll_desc_t *dll_desc,
                         axis2_env_t **env,
                         axis2_char_t *name)

Modified: webservices/axis2/trunk/c/modules/core/description/param.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/param.c?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/param.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/param.c Tue Jan 31 19:39:00 2006
@@ -86,6 +86,7 @@
 axis2_param_free(axis2_param_t *param, 
 						axis2_env_t **env);
 
+/******************************************************************************/
 axis2_param_t* AXIS2_CALL 
 axis2_param_create(axis2_env_t **env, 
 						axis2_char_t *name, void *value)
@@ -136,6 +137,8 @@
     return &(param_impl->param);
 }
 
+/******************************************************************************/
+
 axis2_char_t* AXIS2_CALL 
 axis2_param_get_name(axis2_param_t *param, 
 							axis2_env_t **env)
@@ -241,9 +244,23 @@
 axis2_param_free(axis2_param_t *param, 
 						axis2_env_t **env)
 {
+    void *param_value = NULL;
+    
     AXIS2_FUNC_PARAM_CHECK(param, env, AXIS2_FAILURE);
-	if(NULL != param->ops)
-		AXIS2_FREE((*env)->allocator, param->ops);
+    
+    param_value = AXIS2_PARAM_GET_VALUE(param, env);
+    if(param_value)
+    {
+        if(param->ops && param->ops->value_free)
+        { 
+            param->ops->value_free(param_value, env);
+        }
+        else /* we assume that param value is axis2_char_t* */
+        {
+            AXIS2_FREE((*env)->allocator, param_value);
+        }
+    }
+    AXIS2_FREE((*env)->allocator, param->ops);
     AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(param));    
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/test/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/Makefile.am?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/Makefile.am (original)
+++ webservices/axis2/trunk/c/test/Makefile.am Tue Jan 31 19:39:00 2006
@@ -1 +1 @@
-SUBDIRS = util xml unit core server client
+SUBDIRS = util xml unit core

Modified: webservices/axis2/trunk/c/test/core/clientapi/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/clientapi/Makefile.am?rev=373977&r1=373976&r2=373977&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/clientapi/Makefile.am (original)
+++ webservices/axis2/trunk/c/test/core/clientapi/Makefile.am Tue Jan 31 19:39:00 2006
@@ -16,11 +16,13 @@
 	                -laxis2_om \
 	                -laxis2_engine \
 	                -laxis2_wsdl \
+	                -laxis2_http_sender \
 	                -laxis2_parser \
 	                -laxis2_phaseresolver \
 	                -laxis2_addr \
 	                -laxis2_receivers \
 					-laxis2_clientapi \
+	                -laxis2_http_transport \
 					-laxis2_soap \
                     -laxis2_unix \
 	                -L$(LIBXML2_LIB) $(LIBXML2_LIBNAME) \
@@ -42,6 +44,7 @@
 					-laxis2_clientapi \
 					-laxis2_soap \
                     -laxis2_unix \
+	                -laxis2_http_transport \
 	                -L$(LIBXML2_LIB) $(LIBXML2_LIBNAME) \
 	                -L$(GUTHTHILA_LIB) $(GUTHTHILA_LIBNAME) 
 



Mime
View raw message