axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From din...@apache.org
Subject svn commit: r499279 - in /webservices/axis2/trunk/c: axiom/src/parser/guththila/ guththila/include/ guththila/samples/ guththila/src/ modules/mod_addr/ util/src/
Date Wed, 24 Jan 2007 06:41:50 GMT
Author: dinesh
Date: Tue Jan 23 22:41:48 2007
New Revision: 499279

URL: http://svn.apache.org/viewvc?view=rev&rev=499279
Log:
guththila some memory leak fixed, logics without functions in addr_out_handler.c removed.


Modified:
    webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c
    webservices/axis2/trunk/c/guththila/include/guththila_attribute.h
    webservices/axis2/trunk/c/guththila/include/guththila_buffer.h
    webservices/axis2/trunk/c/guththila/include/guththila_error.h
    webservices/axis2/trunk/c/guththila/include/guththila_token.h
    webservices/axis2/trunk/c/guththila/samples/guththila_main.c
    webservices/axis2/trunk/c/guththila/samples/guththila_writer_main.c
    webservices/axis2/trunk/c/guththila/src/Makefile.am
    webservices/axis2/trunk/c/guththila/src/guththila_buffer.c
    webservices/axis2/trunk/c/guththila/src/guththila_token.c
    webservices/axis2/trunk/c/guththila/src/guththila_writer.c
    webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c
    webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c
    webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
    webservices/axis2/trunk/c/util/src/log.c

Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c Tue
Jan 23 22:41:48 2007
@@ -974,6 +974,7 @@
 		guththila_write_to_buffer ((axis2_env_t *)env, 
 								   AXIS2_INTF_TO_IMPL (writer)->parser, 
 								   (const axis2_char_t *) content);
+		guththila_flush ((axis2_env_t *)env, AXIS2_INTF_TO_IMPL (writer)->parser);
 		return  AXIS2_SUCCESS;
 	}
 }

Modified: webservices/axis2/trunk/c/guththila/include/guththila_attribute.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_attribute.h?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila_attribute.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila_attribute.h Tue Jan 23 22:41:48
2007
@@ -26,7 +26,22 @@
     guththila_token_t *prefix;
     guththila_token_t *name;
     guththila_token_t *value;
-  guththila_token_t *namespace_uri;
+	guththila_token_t *namespace_uri;
 } guththila_attribute_t;
+
+AXIS2_EXTERN guththila_attribute_t * AXIS2_CALL
+guththila_attribute_create (
+	axis2_env_t *env, 
+	guththila_token_t *prefix, 
+	guththila_token_t *name, 
+	guththila_token_t *value,
+	guththila_token_t *ns);
+
+
+AXIS2_EXTERN void AXIS2_CALL
+guththila_attribute_free (
+	axis2_env_t *env,
+	guththila_attribute_t *attribute);
+
 
 #endif /* GUTHTHILA_ATTRIBUTE_H */

Modified: webservices/axis2/trunk/c/guththila/include/guththila_buffer.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_buffer.h?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila_buffer.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila_buffer.h Tue Jan 23 22:41:48 2007
@@ -35,6 +35,8 @@
   guththila_char_t *buff;
 } guththila_buffer_t;
 
+#define GUTHTHILA_BUFFER_SIZE 8000
+
 AXIS2_EXTERN guththila_buffer_t * AXIS2_CALL
 guththila_buffer_create (axis2_env_t * environment, int size);
 

Modified: webservices/axis2/trunk/c/guththila/include/guththila_error.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_error.h?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila_error.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila_error.h Tue Jan 23 22:41:48 2007
@@ -93,7 +93,8 @@
       GUTHTHILA_WRITER_ERROR_EXCESS_HYPENS_IN_COMMENT,
       GUTHTHILA_WRITER_ERROR_INVALID_CHAR_IN_ATTRIBUTE,
       GUTHTHILA_WRITER_ERROR_NON_EXSISTING_URI,
-      GUTHTHILA_WRITER_ERROR_SAME_ATTRIBUTE_REPEAT
+      GUTHTHILA_WRITER_ERROR_SAME_ATTRIBUTE_REPEAT,
+	  GUTHTHILA_ERROR_ATTRIBUTE_FREE
     } guththila_error_codes_t;
 
 

Modified: webservices/axis2/trunk/c/guththila/include/guththila_token.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_token.h?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila_token.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila_token.h Tue Jan 23 22:41:48 2007
@@ -56,8 +56,8 @@
                                      int size);
                                      
 AXIS2_EXTERN void
-guththila_token_free_token_buffer (axis2_env_t * environment,
-                                   guththila_token_t * tok);
+guththila_token_free (axis2_env_t * environment,
+					  guththila_token_t * tok);
 AXIS2_EXTERN int
 guththila_token_length (axis2_env_t * environment,
                         guththila_token_t * tok);
@@ -121,3 +121,8 @@
                           
 
 #endif /* GUTHTHILA_TOKEN_H */
+
+
+
+
+

Modified: webservices/axis2/trunk/c/guththila/samples/guththila_main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/samples/guththila_main.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/samples/guththila_main.c (original)
+++ webservices/axis2/trunk/c/guththila/samples/guththila_main.c Tue Jan 23 22:41:48 2007
@@ -28,7 +28,7 @@
     guththila_t *parser;
     char *xml_buffer;
     allocator = axis2_allocator_init(NULL);
-    xml_buffer = "<?xml version = \"1.0\"?><test></test>";
+    xml_buffer = "<?xml version = \"1.0\"?><test a=\"din\">123</test>";
     environment =
         axis2_env_create(allocator);
 
@@ -67,11 +67,12 @@
                     p = guththila_get_attribute_name
                             (environment, parser, a);
                     printf("%s=\"", p);
-                    AXIS2_FREE(allocator, p);
+                    AXIS2_FREE (allocator, p);
                     p = guththila_get_attribute_value
                             (environment, parser, a);
                     printf("%s\" ", p);
-                    AXIS2_FREE(allocator, p);
+                     AXIS2_FREE (allocator, p);
+					guththila_attribute_free (environment, a);
                 }
                 printf("?>\n");
             }
@@ -165,10 +166,11 @@
             {
                 char *p;
                 p = guththila_get_value(environment, parser);
-                if (!parser->is_whitespace)
-                {
-                    printf(p);
-                }
+             /*    if (!parser->is_whitespace) */
+/*                 { */
+/*                     printf(p); */
+/*                 } */
+				printf (p);
                 AXIS2_FREE(allocator, p);
             }
             break;
@@ -178,7 +180,6 @@
     }
     guththila_reader_free(environment, red);
     guththila_free(environment, parser);
-    axis2_allocator_free(allocator);
     axis2_env_free(environment);
     return 0;
 }

Modified: webservices/axis2/trunk/c/guththila/samples/guththila_writer_main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/samples/guththila_writer_main.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/samples/guththila_writer_main.c (original)
+++ webservices/axis2/trunk/c/guththila/samples/guththila_writer_main.c Tue Jan 23 22:41:48
2007
@@ -20,6 +20,7 @@
 #include <guththila_reader.h>
 #include <guththila_writer.h>
 #include <guththila.h>
+#include <axis2_util.h>
 int main()
 {
     char *t;
@@ -31,18 +32,20 @@
     env = axis2_env_create(allocator);
     /*writer = guththila_writer_create_for_memory (env);*/
     parser = guththila_create(env, NULL);
-    guththila_create_xml_stream_writer_for_memory(env, parser);
+	guththila_create_xml_stream_writer_for_memory(env, parser);
 // guththila_write_start_element_with_prefix (env, parser, "my", "one");
-    guththila_write_start_element(env, parser, "two");
+	 guththila_write_start_element(env, parser, "two");
     guththila_write_default_namespace(env, parser, "http://another.host.com");
     guththila_write_start_element(env, parser, "two.one");
     guththila_write_end_element(env, parser);
     guththila_write_end_document(env, parser);
+	/*guththila_write_to_buffer (env, parser, xml);
+	  guththila_flush (env, parser);*/
     t = guththila_writer_get_buffer(env, parser->xsw->writer);
     printf("%s \n", t);
+	AXIS2_FREE (env->allocator, t);
     guththila_xml_writer_free(env, parser);
     guththila_free(env, parser);
-    axis2_allocator_free(allocator);
     axis2_env_free(env);
     return 0;
 }

Modified: webservices/axis2/trunk/c/guththila/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/Makefile.am?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/guththila/src/Makefile.am Tue Jan 23 22:41:48 2007
@@ -4,6 +4,7 @@
 	 		  guththila_token.c \
 			  guththila_reader.c \
 			  guththila_writer.c \
+			  guththila_attribute.c \
 			  guththila_xml_pull_parser.c \
 			  guththila_unicode.c \
 			  guththila_xml_writer.c

Modified: webservices/axis2/trunk/c/guththila/src/guththila_buffer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_buffer.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_buffer.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_buffer.c Tue Jan 23 22:41:48 2007
@@ -20,6 +20,7 @@
 #include <string.h>
 #include "guththila_buffer.h"
 #include <axis2_env.h>
+#include <stdio.h>
 
 AXIS2_EXTERN guththila_buffer_t * AXIS2_CALL
 guththila_buffer_create(axis2_env_t * environment, int size)
@@ -36,9 +37,12 @@
         name->next = 0;
         name->is_memory = 0;
         name->buff = NULL;
-        if (size != 0)
+        if (size)
+		{
             name->buff = (guththila_char_t *) AXIS2_MALLOC(
-                        environment->allocator, size);
+				environment->allocator, size * sizeof (guththila_char_t));
+			memset (name->buff, 0, size);
+		}
     }
     return name;
 }
@@ -88,7 +92,8 @@
 
     guththila_char_t *x = NULL;
     name->size <<= 1;
-    x = (guththila_char_t *) AXIS2_MALLOC(environment->allocator, name->size);
+    x = (guththila_char_t *) AXIS2_MALLOC(environment->allocator, name->size + 1);
+	memset (x, 0, name->size);
     if (x)
 	{
 		memcpy (x, name->buff, strlen (name->buff));

Modified: webservices/axis2/trunk/c/guththila/src/guththila_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_token.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_token.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_token.c Tue Jan 23 22:41:48 2007
@@ -36,11 +36,17 @@
 
 
 AXIS2_EXTERN void
-guththila_token_free_token_buffer(axis2_env_t * environment,
-        guththila_token_t * tok)
+guththila_token_free (axis2_env_t * environment,
+					  guththila_token_t * tok)
 {
     if (tok)
-        AXIS2_FREE(environment->allocator, tok);
+	{
+/*		if (tok->start)
+			AXIS2_FREE(environment->allocator, tok->start);
+		if (tok->end)
+		AXIS2_FREE(environment->allocator, tok->end);*/
+		AXIS2_FREE (environment->allocator, tok);
+	}
 }
 
 

Modified: webservices/axis2/trunk/c/guththila/src/guththila_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_writer.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_writer.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_writer.c Tue Jan 23 22:41:48 2007
@@ -40,8 +40,8 @@
     wt = (guththila_writer_impl_t *) AXIS2_MALLOC(env->allocator, sizeof(guththila_writer_impl_t));
     wt->outputstream = NULL;
 
-    wt->buffer = guththila_buffer_create(env, 1024);
-    memset((void *)wt->buffer->buff, 0, 1024);
+    wt->buffer = guththila_buffer_create(env, GUTHTHILA_BUFFER_SIZE);
+
     if (!wt->buffer)
         return NULL;
 
@@ -54,11 +54,13 @@
 {
     if (wt)
     {
+		guththila_writer_impl_t *writer_impl = NULL;
+		writer_impl = ((guththila_writer_impl_t *)wt);
         if (wt->guththila_writer_type == GUTHTHILA_WRITER_FILE)
         {
-            if (((guththila_writer_impl_t *)wt)->outputstream)
-                fclose(((guththila_writer_impl_t *)wt)->outputstream);
-            ((guththila_writer_impl_t *)wt)->outputstream = NULL;
+            if (writer_impl->outputstream)
+                fclose(writer_impl->outputstream);
+            writer_impl->outputstream = NULL;
         }
         AXIS2_FREE(env->allocator, (guththila_writer_t *)wt);
         wt = NULL;
@@ -81,14 +83,14 @@
         int size = 0;
         writer_impl = (guththila_writer_impl_t *)wt;
 
-        if (writer_impl->buffer->buff)
-            size = strlen((const char *)writer_impl->buffer->buff);
+		 if (writer_impl->buffer->buff)
+			 size = writer_impl->buffer->next;
 
         if ((size + length) > writer_impl->buffer->size)
         {
             writer_impl->buffer = guththila_buffer_grow(env, writer_impl->buffer);
         }
-        strcat(writer_impl->buffer->buff, buffer);
+        memcpy (writer_impl->buffer->buff, buffer, strlen (buffer));
         c = length;
     }
     return c;

Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c Tue Jan 23 22:41:48
2007
@@ -38,7 +38,7 @@
         parser->buffer = reader_buffer;
     }
     else
-        parser->buffer = guththila_buffer_create(environment, 1024);
+        parser->buffer = guththila_buffer_create(environment, GUTHTHILA_BUFFER_SIZE);
 
     parser->stack = axis2_stack_create(environment);
     parser->attrib = axis2_stack_create(environment);
@@ -56,6 +56,7 @@
     parser->xsw = NULL;
     parser->is_whitespace = 0;
     parser->is_char = 0;
+	parser->guththila_event = -1;
     return parser;
 }
 
@@ -67,10 +68,22 @@
     if (parser->buffer)
         guththila_buffer_free(environment, (void *) parser->buffer);
 
+	if (parser->name)
+		guththila_token_free (environment, parser->name);
+
     if (parser->stack)
         AXIS2_STACK_FREE(parser->stack, environment);
     if (parser->attrib)
+	{
+		int ii = AXIS2_STACK_SIZE(parser->attrib, environment);
+		guththila_attribute_t *attribute;
+		for (; ii > 0; ii--)
+		{
+			attribute = AXIS2_STACK_POP(parser->attrib, environment);
+			guththila_attribute_free (environment, attribute);
+		}
         AXIS2_STACK_FREE(parser->attrib, environment);
+	}
     if (parser->namesp)
         AXIS2_STACK_FREE(parser->namesp, environment);
     if (parser->dep)
@@ -85,15 +98,6 @@
 {
     printf("Throws guththila_exception \t %s \t %d \n", file,
             line);
-    /* Samisa: we should define a set of error codes and a corresponding error message set
-       rather than printing the above line to the console, we should be appending the
-       above string to the error message corresponding to the current error code
-       please delete this comment once this is fixed
-    */
-
-    /* Dinesh: Modified exception function to print line number , file
-       and return error code for particular error. If we feel that
-       file and line number is not necessary lets remove them later.*/
     return error_code;
 }
 
@@ -109,7 +113,9 @@
     /*   el = (guththila_token_t *) AXIS2_STACK_GET_AT (parser->stack, environment, isize-1);
*/
     for (; isize > 0; isize--)
     {
-        el = (guththila_token_t *) AXIS2_STACK_GET_AT(parser->stack, environment, isize
- 1);
+        el = (guththila_token_t *) AXIS2_STACK_GET_AT(parser->stack, 
+													  environment, 
+													  isize - 1);
         guththila_token_relocate(environment, el, offset);
     }
 }
@@ -142,7 +148,8 @@
         }
         else
         {
-            int b = parser->buffer->size;
+            int b = 0;
+			b = parser->buffer->size;
             parser->buffer =
                 guththila_buffer_grow(environment, parser->buffer);
             guththila_relocate_tokens(
@@ -252,7 +259,7 @@
 {
     guththila_token_t *t =
         (guththila_token_t *) AXIS2_MALLOC(environment->allocator,
-                sizeof(guththila_token_t));
+		sizeof(guththila_token_t));
     t->type = Unknown;
     t->start = guththila_last_char(environment, parser);
     AXIS2_STACK_PUSH(parser->stack, environment, t);
@@ -503,9 +510,23 @@
 {
     int ii;
     parser->offset = parser->_next;
-    parser->name = NULL;
-    parser->prefix = NULL;
-    parser->value = NULL;
+	if (parser->name)
+	{
+		guththila_token_free (environment, parser->name);
+		parser->name = NULL;
+	}
+
+	if (parser->prefix)
+	{
+		guththila_token_free (environment, parser->prefix);
+		parser->prefix = NULL;
+	}
+
+	if (parser->value)
+	{
+		guththila_token_free (environment, parser->value);
+		parser->value = NULL;
+	}
     parser->is_whitespace = 0;
     parser->is_char = 0;
 
@@ -1014,7 +1035,9 @@
             guththila_token_t *token;
             token = (guththila_token_t *) AXIS2_STACK_POP(parser->stack, environment);
             if (token->type == _name)
+			{
                 parser->name = token;
+			}
 
             if (AXIS2_STACK_SIZE(parser->stack, environment))
             {
@@ -1095,9 +1118,9 @@
             AXIS2_FREE(environment->allocator, namespace->uri);
             namespace->uri = NULL;
         }
-
     }
-
+	if (depth)
+		AXIS2_FREE (environment->allocator, depth);
 }
 
 
@@ -1108,15 +1131,8 @@
         guththila_token_t * name,
         guththila_token_t * value)
 {
-    guththila_attribute_t *att;
-    att =
-        (guththila_attribute_t *) AXIS2_MALLOC(environment->allocator,
-                sizeof
-                (guththila_attribute_t));
-    att->name = name;
-    att->value = value;
-    att->prefix = NULL;
-    /*   guththila_stack_push (environment, parser->attrib, NULL, att); */
+    guththila_attribute_t *att = NULL;
+	att = guththila_attribute_create (environment, NULL, name, value, NULL);
     AXIS2_STACK_PUSH(parser->attrib, environment, att);
 }
 
@@ -1133,19 +1149,10 @@
         value)
 {
     guththila_attribute_t *att;
-    att =
-        (guththila_attribute_t *) AXIS2_MALLOC(environment->allocator,
-                sizeof
-                (guththila_attribute_t));
-    att->name = name;
-    att->value = value;
-    att->prefix = prefix;
+	att = guththila_attribute_create (environment, prefix, name, value, NULL);
     AXIS2_STACK_PUSH(parser->attrib, environment, att);
-
-    /* _element can keep , tokens and attributes here token set to null */
 }
 
-
 void AXIS2_CALL
 guththila_add_namespace(axis2_env_t *
         environment,
@@ -1155,8 +1162,7 @@
 {
     guththila_namespace_t *ns;
     ns = (guththila_namespace_t *) AXIS2_MALLOC(environment->allocator,
-            sizeof
-            (guththila_namespace_t));
+            sizeof (guththila_namespace_t));
     ns->name =
         guththila_token_to_string(environment, name, parser->unicode_state);
     ns->length = AXIS2_STRLEN(ns->name);
@@ -1323,10 +1329,11 @@
 
 
 AXIS2_EXTERN  int AXIS2_CALL
-guththila_get_namespace_count(axis2_env_t *
-        environment,
-        guththila_t *
-        parser)
+guththila_get_namespace_count(
+	axis2_env_t *
+	environment,
+	guththila_t *
+	parser)
 {
     if (parser->namesp)
         return AXIS2_STACK_SIZE(parser->namesp, environment);
@@ -1336,9 +1343,9 @@
 
 
 AXIS2_EXTERN  guththila_namespace_t * AXIS2_CALL
-guththila_get_namespace(axis2_env_t *
-        environment,
-        guththila_t * parser)
+guththila_get_namespace(
+	axis2_env_t * environment,
+	guththila_t * parser)
 {
     guththila_namespace_t *namespace;
     namespace = (guththila_namespace_t *) AXIS2_STACK_GET(parser->namesp, environment);

Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c Tue Jan 23 22:41:48 2007
@@ -25,7 +25,7 @@
     {
         p->xsw = (guththila_xml_writer_t *) AXIS2_MALLOC(env->allocator, sizeof(guththila_xml_writer_t));
         p->xsw->writer = guththila_writer_create_for_file(env, file);
-        p->xsw->writer_buffer = guththila_buffer_create(env, 1024);
+        p->xsw->writer_buffer = guththila_buffer_create(env, GUTHTHILA_BUFFER_SIZE);
         p->xsw->writer_buffer->buff[0] = 0;
         p->xsw->element = axis2_stack_create(env);
         p->xsw->attribute = axis2_stack_create(env);
@@ -33,7 +33,7 @@
         p->xsw->depth = axis2_stack_create(env);
         p->xsw->next = 0;
         p->xsw->offset = 0;
-        p->xsw->last = 1024;	/* size of the buffer */
+        p->xsw->last = GUTHTHILA_BUFFER_SIZE;	/* size of the buffer */
         p->xsw->start_element_open = -1;
         p->xsw->empty_element_open = -1;
     }
@@ -49,7 +49,7 @@
     {
         p->xsw = (guththila_xml_writer_t *) AXIS2_MALLOC(env->allocator, sizeof(guththila_xml_writer_t));
         p->xsw->writer = guththila_writer_create_for_memory(env);
-        p->xsw->writer_buffer = guththila_buffer_create(env, 1024);
+        p->xsw->writer_buffer = guththila_buffer_create(env, GUTHTHILA_BUFFER_SIZE);
         p->xsw->writer_buffer->buff[0] = 0;
         p->xsw->element = axis2_stack_create(env);
         p->xsw->attribute = axis2_stack_create(env);
@@ -57,7 +57,7 @@
         p->xsw->depth = axis2_stack_create(env);
         p->xsw->next = 0;
         p->xsw->offset = 0;
-        p->xsw->last = 1024;	/* size of the buffer */
+        p->xsw->last = GUTHTHILA_BUFFER_SIZE;	/* size of the buffer */
         p->xsw->start_element_open = -1;
         p->xsw->empty_element_open = -1;
     }
@@ -72,7 +72,7 @@
     int size;
     size = 0;
 
-    guththila_check_xml_stream_writer(env, p);
+    
     /*   guththila_flush (env, p); */
     guththila_write_end_document(env, p);
     if (p->xsw->writer_buffer)
@@ -188,7 +188,7 @@
         guththila_t *p)
 {
     char *sd =  NULL;
-    guththila_check_xml_stream_writer(env, p);
+    
     sd  = "<?xml version = \"1.0\" encoding = \"utf-8\" ?>";
     guththila_write_to_buffer(env, p, sd);
 }
@@ -198,7 +198,7 @@
 guththila_write_end_element(axis2_env_t *env, guththila_t *p)
 {
     void *element = NULL;
-    guththila_check_xml_stream_writer(env, p);
+    
     element = AXIS2_STACK_POP(p->xsw->element, env);
     if (p->xsw->empty_element_open)
     {
@@ -225,7 +225,7 @@
 {
     int c;
     int ii = 0;
-    guththila_check_xml_stream_writer(env, p);
+    
     if (p->xsw->writer_buffer->buff)
     {
         ii = strlen(p->xsw->writer_buffer->buff);
@@ -288,7 +288,7 @@
 
         if (p->xsw->writer_buffer->buff && p->xsw->next > -1)
         {
-            strcat((p->xsw->writer_buffer->buff) + (p->xsw->next), buff);
+            memcpy ((p->xsw->writer_buffer->buff) + (p->xsw->next), buff,
length);
             p->xsw->offset = p->xsw->next;
             p->xsw->next += length;
         }

Modified: webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c Tue Jan 23 22:41:48 2007
@@ -329,10 +329,6 @@
         /* add the service group id as a reference parameter */
         svc_group_context_id = AXIS2_MSG_CTX_GET_SVC_GRP_CTX_ID(msg_ctx, env);
 
-        if (svc_group_context_id
-                && AXIS2_STRCMP(svc_group_context_id, "") != 0)
-        {}
-
         axis2_addr_out_handler_add_to_soap_header(env, epr,
                 AXIS2_WSA_REPLY_TO,
                 soap_header, addr_ns);
@@ -691,36 +687,6 @@
         }
     }
 
-    if (AXIS2_STRCMP(AXIS2_WSA_NAMESPACE_SUBMISSION, addr_ns) == 0)
-    {
-        /* axis2_any_content_type_t *referece_properties = NULL;
-         axiom_element_t *reference_ele = NULL;
-         axiom_node_t *reference_node = NULL;
-         referece_properties =
-             AXIS2_ENDPOINT_REF_GET_REF_PROPERTIES (endpoint_ref, env);
-         addr_ns_obj = axiom_namespace_create (env, addr_ns, AXIS2_WSA_DEFAULT_PREFIX);
-         reference_ele =
-             axiom_element_create (env, header_node,
-                                      EPR_REFERENCE_PROPERTIES, addr_ns_obj,
-                                      &reference_node);
-         axis2_addr_out_handler_process_any_content_type (env,
-                                                          referece_properties,
-                                                          reference_node,
-                                                          addr_ns);
-          if( reference_ele)
-         {
-             axiom_namespace_t *dec_ns = NULL;
-             dec_ns = AXIOM_ELEMENT_FIND_DECLARED_NAMESPACE( reference_ele , env,
-                                                  addr_ns, AXIS2_WSA_DEFAULT_PREFIX);
-             if(! dec_ns)
-             {
-                  AXIOM_NAMESPACE_FREE(addr_ns_obj, env);
-                  addr_ns_obj = NULL;
-             }
-         }
-         */
-
-    }
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/util/src/log.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/log.c?view=diff&rev=499279&r1=499278&r2=499279
==============================================================================
--- webservices/axis2/trunk/c/util/src/log.c (original)
+++ webservices/axis2/trunk/c/util/src/log.c Tue Jan 23 22:41:48 2007
@@ -159,13 +159,8 @@
     axis2_thread_mutex_unlock(log_impl->mutex);
 
     if (NULL == log_impl->stream)
-    {
         log_impl->stream = stderr;
-        /*         log_impl->log.ops = NULL; */
-        /*         axis2_log_impl_free(allocator, &(log_impl->log)); */
 
-        /*         return NULL; */
-    }
     /* by default, log is enabled */
     log_impl->log.enabled = 1;
     log_impl->log.level = AXIS2_LOG_LEVEL_DEBUG;
@@ -543,5 +538,3 @@
 {
 }
 #endif
-
-



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