axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r638263 - /webservices/axis2/trunk/c/util/src/param.c
Date Tue, 18 Mar 2008 08:30:25 GMT
Author: pini
Date: Tue Mar 18 01:30:21 2008
New Revision: 638263

URL: http://svn.apache.org/viewvc?rev=638263&view=rev
Log:
Fixing jira issue 1065

Modified:
    webservices/axis2/trunk/c/util/src/param.c

Modified: webservices/axis2/trunk/c/util/src/param.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/param.c?rev=638263&r1=638262&r2=638263&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/param.c (original)
+++ webservices/axis2/trunk/c/util/src/param.c Tue Mar 18 01:30:21 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
@@ -23,7 +22,6 @@
 
 struct axutil_param
 {
-
     /** Parameter name */
     axis2_char_t *name;
 
@@ -38,25 +36,25 @@
     axutil_hash_t *attrs;
     axutil_array_list_t *value_list;
      void(
-    AXIS2_CALL * value_free) (
+    AXIS2_CALL *value_free) (
     void *param_value,
-    const axutil_env_t * env);
+    const axutil_env_t *env);
 };
 
 AXIS2_EXTERN axutil_param_t *AXIS2_CALL
 axutil_param_create(
-    const axutil_env_t * env,
-    axis2_char_t * name,
+    const axutil_env_t *env,
+    axis2_char_t *name,
     void *value)
 {
     axutil_param_t *param = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
     param = AXIS2_MALLOC(env->allocator, sizeof(axutil_param_t));
     if (!param)
     {
         AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_NO_MEMORY);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Not enough memory");
         AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE);
         return NULL;
     }
@@ -74,41 +72,37 @@
 
 axis2_char_t *AXIS2_CALL
 axutil_param_get_name(
-    axutil_param_t * param,
-    const axutil_env_t * env)
+    axutil_param_t *param,
+    const axutil_env_t *env)
 {
     return param->name;
 }
 
 void *AXIS2_CALL
 axutil_param_get_value(
-    axutil_param_t * param,
-    const axutil_env_t * env)
+    axutil_param_t *param,
+    const axutil_env_t *env)
 {
     return param->value;
 }
 
 axis2_status_t AXIS2_CALL
 axutil_param_set_name(
-    axutil_param_t * param,
-    const axutil_env_t * env,
-    const axis2_char_t * name)
+    axutil_param_t *param,
+    const axutil_env_t *env,
+    const axis2_char_t *name)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     param->name = axutil_strdup(env, name);
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 axutil_param_set_value(
-    axutil_param_t * param,
-    const axutil_env_t * env,
+    axutil_param_t *param,
+    const axutil_env_t *env,
     const void *value)
 {
     void *param_value = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     param_value = axutil_param_get_value(param, env);
     if (param_value)
     {
@@ -127,52 +121,46 @@
 
 axis2_bool_t AXIS2_CALL
 axutil_param_is_locked(
-    axutil_param_t * param,
-    const axutil_env_t * env)
+    axutil_param_t *param,
+    const axutil_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     return param->locked;
 }
 
 axis2_status_t AXIS2_CALL
 axutil_param_set_locked(
-    axutil_param_t * param,
-    const axutil_env_t * env,
+    axutil_param_t *param,
+    const axutil_env_t *env,
     axis2_bool_t value)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     param->locked = value;
     return AXIS2_SUCCESS;
 }
 
 int AXIS2_CALL
 axutil_param_get_param_type(
-    axutil_param_t * param,
-    const axutil_env_t * env)
+    axutil_param_t *param,
+    const axutil_env_t *env)
 {
     return param->type;
 }
 
 axis2_status_t AXIS2_CALL
 axutil_param_set_param_type(
-    axutil_param_t * param,
-    const axutil_env_t * env,
+    axutil_param_t *param,
+    const axutil_env_t *env,
     int type)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     param->type = type;
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
 axutil_param_set_attributes(
-    axutil_param_t * param,
-    const axutil_env_t * env,
-    axutil_hash_t * attrs)
+    axutil_param_t *param,
+    const axutil_env_t *env,
+    axutil_hash_t *attrs)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, attrs, AXIS2_FAILURE);
 
     if (param->attrs)
@@ -195,19 +183,18 @@
 
 axutil_hash_t *AXIS2_CALL
 axutil_param_get_attributes(
-    axutil_param_t * param,
-    const axutil_env_t * env)
+    axutil_param_t *param,
+    const axutil_env_t *env)
 {
     return param->attrs;
 }
 
 axis2_status_t AXIS2_CALL
 axutil_param_set_value_list(
-    axutil_param_t * param,
-    const axutil_env_t * env,
-    axutil_array_list_t * value_list)
+    axutil_param_t *param,
+    const axutil_env_t *env,
+    axutil_array_list_t *value_list)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value_list, AXIS2_FAILURE);
 
     if (param->value_list)
@@ -234,22 +221,20 @@
 
 axutil_array_list_t *AXIS2_CALL
 axutil_param_get_value_list(
-    axutil_param_t * param,
-    const axutil_env_t * env)
+    axutil_param_t *param,
+    const axutil_env_t *env)
 {
     return param->value_list;
 }
 
 void AXIS2_CALL
 axutil_param_free(
-    axutil_param_t * param,
-    const axutil_env_t * env)
+    axutil_param_t *param,
+    const axutil_env_t *env)
 {
     void *param_value = NULL;
     axis2_char_t *param_name = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     param_value = axutil_param_get_value(param, env);
     if (param_value)
     {
@@ -305,14 +290,11 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_param_set_value_free(
-    axutil_param_t * param,
-    const axutil_env_t * env,
+    axutil_param_t *param,
+    const axutil_env_t *env,
     AXIS2_PARAM_VALUE_FREE free_fn)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     param->value_free = free_fn;
-
     return AXIS2_SUCCESS;
 }
 
@@ -322,7 +304,7 @@
 AXIS2_EXTERN void AXIS2_CALL
 axutil_param_dummy_free_fn(
     void *param,
-    const axutil_env_t * env)
+    const axutil_env_t *env)
 {
     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