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 sh...@apache.org on 2010/04/06 06:29:40 UTC

svn commit: r931009 - in /axis/axis2/c/core/trunk/axiom/src: om/om_node.c soap/soap_builder.c

Author: shankar
Date: Tue Apr  6 04:29:40 2010
New Revision: 931009

URL: http://svn.apache.org/viewvc?rev=931009&view=rev
Log:
Fixing invalid error loggings 

Modified:
    axis/axis2/c/core/trunk/axiom/src/om/om_node.c
    axis/axis2/c/core/trunk/axiom/src/soap/soap_builder.c

Modified: axis/axis2/c/core/trunk/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/om/om_node.c?rev=931009&r1=931008&r2=931009&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/om/om_node.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/om/om_node.c Tue Apr  6 04:29:40 2010
@@ -1139,8 +1139,16 @@ axiom_node_get_next_sibling(
         return NULL;
     }
 
-    while(!(om_node->next_sibling) && om_node->parent && om_node->builder
-        && !(axiom_node_is_complete(om_node->parent, env)))
+    /* we have to build the tree using stax builder if
+     * (1) om_node's next_sibling is not given (if available, we can just return that)
+     * (2) om_node is having a parent (otherwise, no concept of sibling)
+     * (3) om_node is having a stax builder (otherwise, it is a programatically built node)
+     * (4) parent is having a stax builder (otherwise, om_node is the only child,
+     *          or sibling is programatically created)
+     * (5) parent is not yet fully built
+     */
+    while((!om_node->next_sibling) && om_node->parent && om_node->parent->builder
+        && om_node->builder && (!axiom_node_is_complete(om_node->parent, env)))
     {
         token = axiom_stax_builder_next_with_token(om_node->builder, env);
         if(token == -1)

Modified: axis/axis2/c/core/trunk/axiom/src/soap/soap_builder.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/soap/soap_builder.c?rev=931009&r1=931008&r2=931009&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/soap/soap_builder.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/soap/soap_builder.c Tue Apr  6 04:29:40 2010
@@ -315,7 +315,10 @@ axiom_soap_builder_next(
     int current_event = AXIS2_MAX_EVENT;
     int status = AXIS2_SUCCESS;
 
-    if((!soap_builder) || (soap_builder->done) || (!soap_builder->om_builder))
+    AXIS2_ASSERT(soap_builder != NULL);
+    AXIS2_ASSERT(soap_builder->om_builder != NULL);
+
+    if(soap_builder->done)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid soap builder");
         return AXIS2_FAILURE;