axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r532675 - in /webservices/axis2/trunk/c/axiom/src: om/om_stax_builder.c parser/libxml2/libxml2_reader_wrapper.c
Date Thu, 26 Apr 2007 09:02:45 GMT
Author: nandika
Date: Thu Apr 26 02:02:44 2007
New Revision: 532675

URL: http://svn.apache.org/viewvc?view=rev&rev=532675
Log:
crash problem in windows fixed

Modified:
    webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
    webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c

Modified: webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c?view=diff&rev=532675&r1=532674&r2=532675
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c Thu Apr 26 02:02:44 2007
@@ -146,12 +146,23 @@
         attr_name = axiom_xml_reader_get_attribute_name_by_number(
             om_builder->parser, env, i);
 
-        attr_name_str = axutil_string_create_assume_ownership(env, &attr_name);
-
+#ifdef WIN32	
+		attr_name_str = axutil_string_create(env, attr_name);
+		axiom_xml_reader_xml_free(om_builder->parser, env, attr_name);
+#else
+		attr_name_str = axutil_string_create_assume_ownership(env, &attr_name);
+#endif
+       
         attr_value = axiom_xml_reader_get_attribute_value_by_number(
             om_builder->parser, env, i);
 
-        attr_value_str = axutil_string_create_assume_ownership(env, &attr_value);
+
+#ifdef WIN32	
+		attr_value_str = axutil_string_create(env, attr_value);
+		axiom_xml_reader_xml_free(om_builder->parser, env, attr_value);
+#else
+		attr_value_str = axutil_string_create_assume_ownership(env, &attr_value);
+#endif
 
         if (attr_name)
         {
@@ -213,7 +224,14 @@
         return NULL;
     }
 
-	temp_value_str = axutil_string_create_assume_ownership(env, &temp_value);
+	    
+#ifdef WIN32	
+	temp_value_str = axutil_string_create(env, temp_value);
+	axiom_xml_reader_xml_free(om_builder->parser, env, temp_value);
+#else
+    temp_value_str = axutil_string_create_assume_ownership(env, &temp_value);
+#endif
+	
 
     if (axiom_node_is_complete(om_builder->lastnode, env))
     {
@@ -311,10 +329,17 @@
         temp_ns_uri = axiom_xml_reader_get_namespace_uri_by_number(
             om_builder->parser, env , i);
 
-        temp_ns_prefix_str = axutil_string_create_assume_ownership(env, &temp_ns_prefix);
-        
+#ifdef WIN32	
+		temp_ns_prefix_str = axutil_string_create(env, temp_ns_prefix);
+#else
+		temp_ns_prefix_str = axutil_string_create_assume_ownership(env, &temp_ns_prefix);
+#endif
+
+#ifdef WIN32
+		temp_ns_uri_str = axutil_string_create(env, temp_ns_uri);
+#else
         temp_ns_uri_str = axutil_string_create_assume_ownership(env, &temp_ns_uri);
-
+#endif
         if (!temp_ns_prefix || axutil_strcmp(temp_ns_prefix, "xmlns") == 0)
         {
             /** default namespace case */
@@ -357,6 +382,10 @@
         }
         axutil_string_free(temp_ns_uri_str, env);
         axutil_string_free(temp_ns_prefix_str, env);
+#ifdef WIN32	
+		axiom_xml_reader_xml_free(om_builder->parser, env, temp_ns_uri);
+		axiom_xml_reader_xml_free(om_builder->parser, env, temp_ns_prefix);
+#endif
         if (!om_ns)
         {
             /* something went wrong */
@@ -414,7 +443,12 @@
         return NULL;
     }
     
+#ifdef WIN32	
+	temp_localname_str = axutil_string_create(env, temp_localname);
+	axiom_xml_reader_xml_free(om_builder->parser, env, temp_localname);
+#else
     temp_localname_str = axutil_string_create_assume_ownership(env, &temp_localname);
+#endif
     
     om_builder->element_level++;
 

Modified: webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c?view=diff&rev=532675&r1=532674&r2=532675
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c Thu Apr 26
02:02:44 2007
@@ -467,10 +467,7 @@
     if (AXIS2_INTF_TO_IMPL(parser)->reader)
     {
         xmlTextReaderClose(AXIS2_INTF_TO_IMPL(parser)->reader);
-#if defined( WIN32 )
-#else
         xmlFreeTextReader(AXIS2_INTF_TO_IMPL(parser)->reader);
-#endif
     }
     AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(parser));
     return;



---------------------------------------------------------------------
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