You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2008/08/05 18:31:37 UTC

svn commit: r682776 - in /webservices/axis2/trunk/c: axiom/src/soap/soap_header.c src/core/engine/phase.c

Author: damitha
Date: Tue Aug  5 09:31:37 2008
New Revision: 682776

URL: http://svn.apache.org/viewvc?rev=682776&view=rev
Log:
Fixing AXIS2C-1250

Modified:
    webservices/axis2/trunk/c/axiom/src/soap/soap_header.c
    webservices/axis2/trunk/c/src/core/engine/phase.c

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_header.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_header.c?rev=682776&r1=682775&r2=682776&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_header.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_header.c Tue Aug  5 09:31:37 2008
@@ -547,8 +547,7 @@
     {
         return AXIS2_FAILURE;
     }
-    for (hi = axutil_hash_first(soap_header->header_blocks, env);
-         hi; hi = axutil_hash_next(env, hi))
+    for (hi = axutil_hash_first(soap_header->header_blocks, env); hi; hi = axutil_hash_next(env, hi))
     {
         const void *key = NULL;
         void *val = NULL;
@@ -569,8 +568,7 @@
                 ele =
                     (axiom_element_t *) axiom_node_get_data_element(node, env);
                 element_qname = axiom_element_get_qname(ele, env, node);
-                if (axiom_soap_header_qname_matches(env, element_qname, qname)
-                    == AXIS2_TRUE)
+                if (axiom_soap_header_qname_matches(env, element_qname, qname) == AXIS2_TRUE)
                 {
                     axiom_node_detach(node, env);
                     /* axiom_node_free_tree(node, env); */
@@ -578,11 +576,17 @@
                                     AXIS2_HASH_KEY_STRING, NULL);
                     axiom_soap_header_block_free(header_block, env);
                     axiom_node_free_tree(node, env);
-                    return AXIS2_SUCCESS;
+                    break;
                 }
             }
         }
     }
+
+    if(hi)
+    {
+        AXIS2_FREE(env->allocator, hi);
+    }
+
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/src/core/engine/phase.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/phase.c?rev=682776&r1=682775&r2=682776&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/phase.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/phase.c Tue Aug  5 09:31:37 2008
@@ -210,7 +210,24 @@
                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
                     "Invoke the handler %s within the phase %s", handler_name,
                         phase->name);
-                status = axis2_handler_invoke(handler, env, msg_ctx);
+
+                /* Test code. This is used when valgrind is used to find leaks in Axis2/C modules.
+                 * if(!axutil_strcmp(handler_name, "SandeshaGlobalInHandler") || !axutil_strcmp(
+                            handler_name, "SandeshaInHandler"))
+                {
+                    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+                        "dam_handler_name %s. dam_phase_name %s", handler_name, phase->name);
+                    if(!axutil_strcmp(handler_name, "SandeshaGlobalInHandler"))
+                    {
+                        status = sandesha2_global_in_handler_invoke(phase->first_handler, env, msg_ctx);
+                    }
+                    if(!axutil_strcmp(handler_name, "SandeshaInHandler"))
+                    {
+                        status = sandesha2_in_handler_invoke(phase->first_handler, env, msg_ctx);
+                    }
+                }
+                else*/
+                    status = axis2_handler_invoke(handler, env, msg_ctx);
                 if (!status)
                 {
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -242,6 +259,7 @@
             AXIS2_LOG_INFO(env->log,
                 "Invoke the last handler %s within the phase %s", handler_name, 
                 phase->name);
+            
             status = axis2_handler_invoke(phase->last_handler, env, msg_ctx);
             if (!status)
             {