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 da...@apache.org on 2006/02/27 06:08:23 UTC

svn commit: r381262 - in /webservices/axis2/trunk/c/modules/core: clientapi/call.c context/conf_ctx.c deployment/conf_init.c

Author: damitha
Date: Sun Feb 26 21:08:21 2006
New Revision: 381262

URL: http://svn.apache.org/viewcvs?rev=381262&view=rev
Log:
conf is not freed from client side. Fixed it


Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/context/conf_ctx.c
    webservices/axis2/trunk/c/modules/core/deployment/conf_init.c

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=381262&r1=381261&r2=381262&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Sun Feb 26 21:08:21 2006
@@ -278,20 +278,19 @@
     {
         AXIS2_CALLBACK_RECV_FREE(call_impl->callback_recv, env);
         call_impl->callback_recv = NULL;
-    }    
+    }   
+
+    if (call_impl->last_res_msg_ctx)
+    {
+        AXIS2_MSG_CTX_FREE(call_impl->last_res_msg_ctx, env);
+        call_impl->last_res_msg_ctx = NULL;
+    }
     
     if (call_impl->svc_ctx)
     {
         axis2_conf_ctx_t *conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(call_impl->svc_ctx, env);
         if (conf_ctx)
         {
-            axis2_conf_t *conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
-            if (conf)
-            {
-                AXIS2_CONF_CTX_FREE(conf, env);
-                conf = NULL;
-            }
-                
             AXIS2_CONF_CTX_FREE(conf_ctx, env);
             conf_ctx = NULL;
         }
@@ -845,6 +844,7 @@
     axis2_qname_t *op_qname = NULL;
     axis2_svc_t *svc = NULL;
     axis2_op_t *op = NULL;
+    axis2_om_node_t* node_to_ret = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
@@ -879,6 +879,12 @@
         msg_ctx = AXIS2_MEP_CLIENT_PREPARE_SOAP_ENVELOPE(call_impl->base, env, om_node_to_send);
         if (msg_ctx)
         {
+            if (call_impl->last_res_msg_ctx)
+            {
+                AXIS2_MSG_CTX_FREE(call_impl->last_res_msg_ctx, env);
+                call_impl->last_res_msg_ctx = NULL;
+            }
+
             call_impl->last_res_msg_ctx = axis2_call_invoke_blocking(call, env, op, msg_ctx);
             if (call_impl->last_res_msg_ctx)
             {
@@ -891,15 +897,17 @@
                     soap_node = AXIS2_SOAP_BODY_GET_BASE_NODE(soap_body, env);
                     if (soap_node)
                     {
-                        return AXIS2_OM_NODE_GET_FIRST_CHILD(soap_node, env);
+                        node_to_ret = AXIS2_OM_NODE_GET_FIRST_CHILD(soap_node, env);
                     }
                 }
             }
+            AXIS2_MSG_CTX_FREE(msg_ctx, env);
+            msg_ctx = NULL;
         }
         
     }
     
-    return NULL;
+    return node_to_ret;
 }
 
 /**
@@ -957,6 +965,13 @@
         if (msg_ctx)
         {
             AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, envelope);
+            
+            if (call_impl->last_res_msg_ctx)
+            {
+                AXIS2_MSG_CTX_FREE(call_impl->last_res_msg_ctx, env);
+                call_impl->last_res_msg_ctx = NULL;
+            }
+
             call_impl->last_res_msg_ctx = axis2_call_invoke_blocking(call, env, op, msg_ctx);
             return AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(call_impl->last_res_msg_ctx, env);
         }

Modified: webservices/axis2/trunk/c/modules/core/context/conf_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/conf_ctx.c?rev=381262&r1=381261&r2=381262&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/conf_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/conf_ctx.c Sun Feb 26 21:08:21 2006
@@ -480,6 +480,11 @@
         axis2_hash_free(conf_ctx_impl->svc_grp_ctx_map, env);
         conf_ctx_impl->svc_grp_ctx_map = NULL;
     }
+    if(conf_ctx_impl->conf)
+    {
+        AXIS2_CONF_FREE(conf_ctx_impl->conf, env);
+        conf_ctx_impl->conf = NULL;
+    }
     
     AXIS2_FREE((*env)->allocator, conf_ctx_impl);
     conf_ctx_impl = NULL;

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=381262&r1=381261&r2=381262&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_init.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_init.c Sun Feb 26 21:08:21 2006
@@ -84,7 +84,8 @@
     {
         return NULL;
     }
-    
+    AXIS2_CONF_SET_DEP_ENGINE(conf, env, dep_engine);
+
     phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
     if (!phase_resolver)
     {