axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r565229 - in /webservices/axis2/trunk/c/neethi: include/neethi_policy.h src/policy.c src/util.c
Date Mon, 13 Aug 2007 04:02:33 GMT
Author: manjula
Date: Sun Aug 12 21:02:32 2007
New Revision: 565229

URL: http://svn.apache.org/viewvc?view=rev&rev=565229
Log:
Adding a reference to the root node to build the policy in policy struct. 

Modified:
    webservices/axis2/trunk/c/neethi/include/neethi_policy.h
    webservices/axis2/trunk/c/neethi/src/policy.c
    webservices/axis2/trunk/c/neethi/src/util.c

Modified: webservices/axis2/trunk/c/neethi/include/neethi_policy.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/neethi_policy.h?view=diff&rev=565229&r1=565228&r2=565229
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/neethi_policy.h (original)
+++ webservices/axis2/trunk/c/neethi/include/neethi_policy.h Sun Aug 12 21:02:32 2007
@@ -107,6 +107,12 @@
             neethi_policy_t *policy,
             const axutil_env_t *env);
 
+        AXIS2_EXTERN axis2_status_t AXIS2_CALL
+        neethi_policy_set_root_node(
+            neethi_policy_t *policy,
+            const axutil_env_t *env,
+            axiom_node_t *root_node);
+
 
     /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/neethi/src/policy.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/policy.c?view=diff&rev=565229&r1=565228&r2=565229
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/policy.c (original)
+++ webservices/axis2/trunk/c/neethi/src/policy.c Sun Aug 12 21:02:32 2007
@@ -26,6 +26,7 @@
 /*  axutil_hash_t *attributes_map;*/
     axis2_char_t *name;
     axis2_char_t *id;
+    axiom_node_t *root_node;
 };
 
 AXIS2_EXTERN neethi_policy_t *AXIS2_CALL 
@@ -65,6 +66,7 @@
     */
     neethi_policy->name = NULL;
     neethi_policy->id = NULL;
+    neethi_policy->root_node = NULL;
 
     return neethi_policy;
 }
@@ -105,6 +107,11 @@
             AXIS2_FREE(env->allocator, neethi_policy->name);
             neethi_policy->name = NULL;
         }    
+        if(neethi_policy->root_node)
+        {
+            axiom_node_free_tree(neethi_policy->root_node, env);
+            neethi_policy->root_node = NULL;
+        }    
         AXIS2_FREE(env->allocator, neethi_policy);
         neethi_policy = NULL;
     }
@@ -327,6 +334,15 @@
     return AXIS2_SUCCESS;
 }
 
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+neethi_policy_set_root_node(
+    neethi_policy_t *policy,
+    const axutil_env_t *env,
+    axiom_node_t *root_node)
+{
+    policy->root_node = root_node;
+    return AXIS2_SUCCESS;
+}
 
 
 

Modified: webservices/axis2/trunk/c/neethi/src/util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/util.c?view=diff&rev=565229&r1=565228&r2=565229
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/util.c (original)
+++ webservices/axis2/trunk/c/neethi/src/util.c Sun Aug 12 21:02:32 2007
@@ -63,6 +63,9 @@
         return NULL;
     }   
 
+    axiom_stax_builder_free_self(builder, env);
+    builder = NULL;
+
     return neethi_util_create_policy_from_om(env, root_node);
      
 }
@@ -87,6 +90,7 @@
             {
                 return NULL;
             }
+            neethi_policy_set_root_node(neethi_policy, env, root_node);
             return neethi_policy;
         }
         else return NULL;



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message