You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2006/12/09 23:48:09 UTC
svn commit: r485078 - in /webservices/axis2/trunk/c:
guththila/src/guththila_buffer.c guththila/src/guththila_token.c
samples/server/echo/echo_skeleton.c
Author: dinesh
Date: Sat Dec 9 14:48:06 2006
New Revision: 485078
URL: http://svn.apache.org/viewvc?view=rev&rev=485078
Log:
removed AXIS2C_REALLOC from guththila code
Modified:
webservices/axis2/trunk/c/guththila/src/guththila_buffer.c
webservices/axis2/trunk/c/guththila/src/guththila_token.c
webservices/axis2/trunk/c/samples/server/echo/echo_skeleton.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=485078&r1=485077&r2=485078
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_buffer.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_buffer.c Sat Dec 9 14:48:06 2006
@@ -89,10 +89,12 @@
guththila_char_t *x = NULL;
name->size <<= 1;
- x = (guththila_char_t *) AXIS2_REALLOC(environment->allocator,
- name->buff, name->size);
+ x = (guththila_char_t *) AXIS2_MALLOC(environment->allocator, name->size);
if (x)
+ {
+ memcpy (x, name->buff, strlen (name->buff));
name->buff = x;
+ }
else
name->size >>= 1;
return name;
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=485078&r1=485077&r2=485078
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_token.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_token.c Sat Dec 9 14:48:06 2006
@@ -71,9 +71,15 @@
guththila_token_grow(axis2_env_t * environment,
guththila_token_t * tok)
{
+ guththila_token_t *dest;
tok->size <<= 1;
- tok = (guththila_token_t *) AXIS2_REALLOC(environment->allocator,
- tok, sizeof(guththila_token_t) * tok->size);
+ dest = (guththila_token_t *) AXIS2_MALLOC(environment->allocator,
+ sizeof(guththila_token_t) * tok->size);
+ if (dest)
+ {
+ memcpy (dest, tok, tok->size < 1);
+ tok = dest;
+ }
return tok;
}
Modified: webservices/axis2/trunk/c/samples/server/echo/echo_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/echo/echo_skeleton.c?view=diff&rev=485078&r1=485077&r2=485078
==============================================================================
--- webservices/axis2/trunk/c/samples/server/echo/echo_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/echo/echo_skeleton.c Sat Dec 9 14:48:06 2006
@@ -17,6 +17,8 @@
#include <axis2_svc_skeleton.h>
#include "echo.h"
#include <axis2_array_list.h>
+#include <axis2_msg_ctx.h>
+#include <stdio.h>
int AXIS2_CALL
echo_free(axis2_svc_skeleton_t *svc_skeleton,
@@ -91,6 +93,12 @@
* To see how to deal with multiple impl methods, have a look at the
* math sample.
*/
+ if (AXIS2_MSG_CTX_GET_IS_SOAP_11 (msg_ctx, env))
+ {
+ AXIS2_ERROR_SET_STATUS_CODE (env->error, AXIS2_FAILURE);
+ AXIS2_ERROR_SET_MESSAGE (env->error, "Not Handling SOAP11 request \n");
+ return NULL;
+ }
return axis2_echo_echo(env, node);
}
@@ -103,12 +111,11 @@
* called 'EchoServiceError'
*/
axiom_node_t *error_node = NULL;
- axiom_node_t* text_node = NULL;
+ axiom_node_t *text_node = NULL;
axiom_element_t *error_ele = NULL;
- error_ele = axiom_element_create(env, node, "EchoServiceError", NULL,
- &error_node);
- AXIOM_ELEMENT_SET_TEXT(error_ele, env, "Echo service failed ",
- text_node);
+
+ error_ele = axiom_element_create(env, NULL, "EchoServiceError", NULL, &error_node);
+ AXIOM_ELEMENT_SET_TEXT(error_ele, env, "Echo service failed ", text_node);
return error_node;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org