You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by se...@apache.org on 2008/03/18 22:30:01 UTC
svn commit: r638587 - /webservices/axis2/trunk/c/util/src/stack.c
Author: senaka
Date: Tue Mar 18 14:30:00 2008
New Revision: 638587
URL: http://svn.apache.org/viewvc?rev=638587&view=rev
Log:
Fixing JIRA Issue AXIS2C-1068. Thanks Manoj for the patch.
Modified:
webservices/axis2/trunk/c/util/src/stack.c
Modified: webservices/axis2/trunk/c/util/src/stack.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/stack.c?rev=638587&r1=638586&r2=638587&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/stack.c (original)
+++ webservices/axis2/trunk/c/util/src/stack.c Tue Mar 18 14:30:00 2008
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -38,7 +37,7 @@
AXIS2_EXTERN axutil_stack_t *AXIS2_CALL
axutil_stack_create(
- const axutil_env_t * env)
+ const axutil_env_t *env)
{
axutil_stack_t *stack = NULL;
@@ -50,6 +49,7 @@
if (!stack)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
return NULL;
}
@@ -64,6 +64,7 @@
if (!stack->data)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
axutil_stack_free(stack, env);
return NULL;
}
@@ -73,8 +74,8 @@
void AXIS2_CALL
axutil_stack_free(
- axutil_stack_t * stack,
- const axutil_env_t * env)
+ axutil_stack_t *stack,
+ const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -88,8 +89,8 @@
void *AXIS2_CALL
axutil_stack_pop(
- axutil_stack_t * stack,
- const axutil_env_t * env)
+ axutil_stack_t *stack,
+ const axutil_env_t *env)
{
void *value = NULL;
AXIS2_ENV_CHECK(env, NULL);
@@ -113,8 +114,8 @@
axis2_status_t AXIS2_CALL
axutil_stack_push(
- axutil_stack_t * stack,
- const axutil_env_t * env,
+ axutil_stack_t *stack,
+ const axutil_env_t *env,
void *value)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -134,6 +135,7 @@
if (!new_data)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
return AXIS2_FAILURE;
}
memset(new_data, 0, sizeof(void *) * new_capacity);
@@ -151,17 +153,16 @@
int AXIS2_CALL
axutil_stack_size(
- axutil_stack_t * stack,
- const axutil_env_t * env)
+ axutil_stack_t *stack,
+ const axutil_env_t *env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return stack->size;
}
void *AXIS2_CALL
axutil_stack_get(
- axutil_stack_t * stack,
- const axutil_env_t * env)
+ axutil_stack_t *stack,
+ const axutil_env_t *env)
{
if (stack->size > 0)
{
@@ -172,8 +173,8 @@
void *AXIS2_CALL
axutil_stack_get_at(
- axutil_stack_t * stack,
- const axutil_env_t * env,
+ axutil_stack_t *stack,
+ const axutil_env_t *env,
int i)
{
if ((stack->size == 0) || (i < 0) || (i >= stack->size))
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org