axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r389986 - in /webservices/axis2/trunk/c: modules/core/addr/msg_info_headers.c modules/core/clientapi/call.c modules/core/clientapi/mep_client.c modules/core/deployment/conf_init.c samples/client/addr_echo/echo_client.c
Date Thu, 30 Mar 2006 03:59:04 GMT
Author: samisa
Date: Wed Mar 29 19:59:03 2006
New Revision: 389986

URL: http://svn.apache.org/viewcvs?rev=389986&view=rev
Log:
Memory leak fixes for client side

Modified:
    webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
    webservices/axis2/trunk/c/modules/core/deployment/conf_init.c
    webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c

Modified: webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c?rev=389986&r1=389985&r2=389986&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c (original)
+++ webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c Wed Mar 29 19:59:03 2006
@@ -593,6 +593,11 @@
         AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->to, env);
         msg_info_headers_impl->to = NULL;
     }
+    if (msg_info_headers_impl->from)
+    {
+        AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->from, env);
+        msg_info_headers_impl->from = NULL;
+    }
     if (msg_info_headers_impl->reply_to)
     {
         AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->reply_to, env);

Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=389986&r1=389985&r2=389986&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Wed Mar 29 19:59:03 2006
@@ -60,6 +60,8 @@
     axis2_op_t *op_template;
     /** last response message context */
     axis2_msg_ctx_t *last_res_msg_ctx;
+    /* used to hold the service created in assume service */
+    axis2_svc_t *axis_svc_private;
 
 } axis2_call_impl_t;
 
@@ -209,6 +211,7 @@
     call_impl->op_template = NULL;
     call_impl->last_res_msg_ctx = NULL;
     call_impl->svc_ctx = NULL;
+    call_impl->axis_svc_private = NULL;
     
     if(svc_ctx)
     {
@@ -309,11 +312,17 @@
         }
     }    
    
-    if(NULL != call_impl->op_template)
+    if (call_impl->axis_svc_private)
+    {
+        AXIS2_SVC_FREE(call_impl->axis_svc_private, env);
+        call_impl->axis_svc_private = NULL;
+    }
+
+    /*if(NULL != call_impl->op_template)
     {
         AXIS2_OP_FREE(call_impl->op_template, env);
         call_impl->op_template = NULL;
-    } 
+    }*/ 
 
     AXIS2_FREE((*env)->allocator, call_impl);
     call_impl = NULL;
@@ -1304,7 +1313,13 @@
         axis2_phases_info_t *info = NULL;
         
         /* we will assume a Service and operations */
-        axis_svc = axis2_svc_create_with_qname(env, assumed_svc_qname);
+        if (call_impl->axis_svc_private)
+        {
+            AXIS2_SVC_FREE(call_impl->axis_svc_private, env);
+            call_impl->axis_svc_private = NULL;
+        }
+        call_impl->axis_svc_private = axis2_svc_create_with_qname(env, assumed_svc_qname);
+        axis_svc = call_impl->axis_svc_private;
         qtemp_op = axis2_qname_create(env, "TemplateOperation", NULL, NULL);
         call_impl->op_template = axis2_op_create_with_qname(env, qtemp_op);
         AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(call_impl->op_template, env, AXIS2_MEP_URI_OUT_IN);

Modified: webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c?rev=389986&r1=389985&r2=389986&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c Wed Mar 29 19:59:03 2006
@@ -570,6 +570,12 @@
     if (response_envelope) 
     {
         AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
+        if (engine)
+        {
+            AXIS2_ENGINE_FREE(engine, env);
+            engine = NULL;
+        }
+                    
         engine = axis2_engine_create(env, conf_ctx);
         if (engine)
         {

Modified: webservices/axis2/trunk/c/modules/core/deployment/conf_init.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/conf_init.c?rev=389986&r1=389985&r2=389986&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_init.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_init.c Wed Mar 29 19:59:03 2006
@@ -104,6 +104,8 @@
 
     axis2_init_modules(env, conf_ctx);
     axis2_init_transports(env, conf_ctx);
+
+    AXIS2_PHASE_RESOLVER_FREE(phase_resolver, env);
    
     return conf_ctx;
 }

Modified: webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c?rev=389986&r1=389985&r2=389986&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c Wed Mar 29 19:59:03 2006
@@ -218,6 +218,11 @@
     {
         AXIS2_CALL_FREE(call, &env);
     }
+    if (endpoint_ref)
+    {
+        AXIS2_ENDPOINT_REF_FREE(endpoint_ref, &env);
+        endpoint_ref = NULL;
+    }
     return status;
 }
 



Mime
View raw message