axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r293276 - in /webservices/axis2/trunk/c/modules/xml/guththila/src: guththila_xml_stream_writer.c guththila_xml_stream_writer.h
Date Mon, 03 Oct 2005 08:19:06 GMT
Author: samisa
Date: Mon Oct  3 01:19:01 2005
New Revision: 293276

URL: http://svn.apache.org/viewcvs?rev=293276&view=rev
Log:
Added paramter validation for create

Modified:
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.h

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c?rev=293276&r1=293275&r2=293276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c Mon
Oct  3 01:19:01 2005
@@ -19,11 +19,15 @@
 
 #include <apr_strings.h>
   
-  guththila_xml_stream_writer_t* guththila_create_xml_stream_writer(FILE* writer, char* encoding,
int prefix_defaulting)
+  guththila_xml_stream_writer_t* guththila_create_xml_stream_writer(FILE* writer, const char*
encoding, int prefix_defaulting)
 {
+    if (!writer)
+        return 0;
+    
     guththila_xml_stream_writer_t *stream_writer = (guththila_xml_stream_writer_t*) malloc
(sizeof (guththila_xml_stream_writer_t));
     stream_writer->writer = writer;
-    stream_writer->encoding = encoding;
+    if (encoding)
+        stream_writer->encoding = encoding;
     stream_writer->prefix_defaulting = prefix_defaulting;
 
       //initialize APR pool, we ned this pool to allocate memory to hash map and stack

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.h?rev=293276&r1=293275&r2=293276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.h (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.h Mon
Oct  3 01:19:01 2005
@@ -49,7 +49,7 @@
     int empty_element;
 } guththila_xml_stream_writer_t;
                    
-guththila_xml_stream_writer_t* guththila_create_xml_stream_writer(FILE* writer, char* encoding,
int is_prefix_defaulting);
+guththila_xml_stream_writer_t* guththila_create_xml_stream_writer(FILE* writer, const char*
encoding, int is_prefix_defaulting);
   
   int guththila_xml_stream_writer_end_start_element(guththila_xml_stream_writer_t* stream_writer);
   



Mime
View raw message