axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r643999 - in /webservices/axis2/trunk/c/util/src: thread_pool.c url.c utils.c uuid_gen.c version.c
Date Wed, 02 Apr 2008 18:06:31 GMT
Author: pini
Date: Wed Apr  2 11:06:28 2008
New Revision: 643999

URL: http://svn.apache.org/viewvc?rev=643999&view=rev
Log:
Fixing jira issues 1080 and 1081

Modified:
    webservices/axis2/trunk/c/util/src/thread_pool.c
    webservices/axis2/trunk/c/util/src/url.c
    webservices/axis2/trunk/c/util/src/utils.c
    webservices/axis2/trunk/c/util/src/uuid_gen.c
    webservices/axis2/trunk/c/util/src/version.c

Modified: webservices/axis2/trunk/c/util/src/thread_pool.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/thread_pool.c?rev=643999&r1=643998&r2=643999&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/thread_pool.c (original)
+++ webservices/axis2/trunk/c/util/src/thread_pool.c Wed Apr  2 11:06:28 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
@@ -27,7 +26,7 @@
 
 AXIS2_EXTERN axutil_thread_pool_t *AXIS2_CALL
 axutil_thread_pool_init(
-    axutil_allocator_t * allocator)
+    axutil_allocator_t *allocator)
 {
     axutil_thread_pool_t *pool = NULL;
 
@@ -46,7 +45,7 @@
 
 AXIS2_EXTERN void AXIS2_CALL
 axutil_thread_pool_free(
-    axutil_thread_pool_t * pool)
+    axutil_thread_pool_t *pool)
 {
     if (!pool)
     {
@@ -62,7 +61,7 @@
 
 AXIS2_EXTERN axutil_thread_t *AXIS2_CALL
 axutil_thread_pool_get_thread(
-    axutil_thread_pool_t * pool,
+    axutil_thread_pool_t *pool,
     axutil_thread_start_t func,
     void *data)
 {
@@ -79,8 +78,8 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_thread_pool_join_thread(
-    axutil_thread_pool_t * pool,
-    axutil_thread_t * thd)
+    axutil_thread_pool_t *pool,
+    axutil_thread_t *thd)
 {
     if (!pool || !thd)
     {
@@ -91,8 +90,8 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_thread_pool_exit_thread(
-    axutil_thread_pool_t * pool,
-    axutil_thread_t * thd)
+    axutil_thread_pool_t *pool,
+    axutil_thread_t *thd)
 {
     if (!pool || !thd)
     {
@@ -103,8 +102,8 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_thread_pool_thread_detach(
-    axutil_thread_pool_t * pool,
-    axutil_thread_t * thd)
+    axutil_thread_pool_t *pool,
+    axutil_thread_t *thd)
 {
     if (!pool || !thd)
     {
@@ -115,7 +114,7 @@
 
 AXIS2_EXTERN axutil_env_t *AXIS2_CALL
 axutil_init_thread_env(
-    const axutil_env_t * system_env)
+    const axutil_env_t *system_env)
 {
     axutil_error_t *error = axutil_error_create(system_env->allocator);
     return axutil_env_create_with_error_log_thread_pool(system_env->allocator,

Modified: webservices/axis2/trunk/c/util/src/url.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/url.c?rev=643999&r1=643998&r2=643999&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/url.c (original)
+++ webservices/axis2/trunk/c/util/src/url.c Wed Apr  2 11:06:28 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
@@ -37,11 +36,11 @@
 
 AXIS2_EXTERN axutil_url_t *AXIS2_CALL
 axutil_url_create(
-    const axutil_env_t * env,
-    const axis2_char_t * protocol,
-    const axis2_char_t * host,
+    const axutil_env_t *env,
+    const axis2_char_t *protocol,
+    const axis2_char_t *host,
     const int port,
-    const axis2_char_t * path)
+    const axis2_char_t *path)
 {
     axutil_url_t *url = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -59,6 +58,7 @@
     if (!url)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
         return NULL;
     }
     url->protocol = axutil_strdup(env, protocol);
@@ -110,8 +110,8 @@
 
 AXIS2_EXTERN axutil_url_t *AXIS2_CALL
 axutil_url_parse_string(
-    const axutil_env_t * env,
-    const axis2_char_t * str_url)
+    const axutil_env_t *env,
+    const axis2_char_t *str_url)
 {
     /**
      * Only accepted format is : 
@@ -141,12 +141,14 @@
     if (!host)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_ADDRESS, AXIS2_FAILURE);
+  
         AXIS2_FREE(env->allocator, tmp_url_str);
         return NULL;
     }
     if (axutil_strlen(host) < 3 * sizeof(axis2_char_t))
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_ADDRESS, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid IP or hostname");
         AXIS2_FREE(env->allocator, tmp_url_str);
         return NULL;
     }
@@ -155,6 +157,7 @@
     if (axutil_strlen(host) <= 0)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_ADDRESS, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid IP or hostname");
         AXIS2_FREE(env->allocator, tmp_url_str);
         return NULL;
     }
@@ -269,10 +272,9 @@
 
 AXIS2_EXTERN void AXIS2_CALL
 axutil_url_free(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     if (url->protocol)
     {
         AXIS2_FREE(env->allocator, url->protocol);
@@ -304,14 +306,13 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axutil_url_to_external_form(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     axis2_char_t *external_form = NULL;
     axis2_ssize_t len = 0;
     axis2_char_t port_str[8];
     axis2_bool_t print_port = AXIS2_FALSE;
-    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, url, NULL);
 
     if (!url->protocol)
@@ -355,11 +356,10 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_url_set_protocol(
-    axutil_url_t * url,
-    const axutil_env_t * env,
-    axis2_char_t * protocol)
+    axutil_url_t *url,
+    const axutil_env_t *env,
+    axis2_char_t *protocol)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, protocol, AXIS2_FAILURE);
     if (url->protocol)
     {
@@ -372,22 +372,21 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axutil_url_get_protocol(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     return url->protocol;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_url_set_host(
-    axutil_url_t * url,
-    const axutil_env_t * env,
-    axis2_char_t * host)
+    axutil_url_t *url,
+    const axutil_env_t *env,
+    axis2_char_t *host)
 {
     axis2_ssize_t len = 0;
     axis2_char_t port_str[8];
     axis2_bool_t print_port = AXIS2_FALSE;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, host, AXIS2_FAILURE);
 
     if (url->host)
@@ -420,21 +419,20 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axutil_url_get_host(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     return url->host;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_url_set_server(
-    axutil_url_t * url,
-    const axutil_env_t * env,
-    axis2_char_t * server)
+    axutil_url_t *url,
+    const axutil_env_t *env,
+    axis2_char_t *server)
 {
     axis2_char_t *temp = NULL;
     axis2_char_t *port_str = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, server, AXIS2_FAILURE);
 
     temp = axutil_strdup(env, server);
@@ -476,13 +474,12 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axutil_url_get_server(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     axis2_ssize_t len = 0;
     axis2_char_t port_str[8];
     axis2_bool_t print_port = AXIS2_FALSE;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     if (!url->server && !url->host)
     {
@@ -514,14 +511,13 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_url_set_port(
-    axutil_url_t * url,
-    const axutil_env_t * env,
+    axutil_url_t *url,
+    const axutil_env_t *env,
     int port)
 {
     axis2_ssize_t len = 0;
     axis2_char_t port_str[8];
     axis2_bool_t print_port = AXIS2_FALSE;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     if (url->port == port)
     {
         return AXIS2_SUCCESS;
@@ -552,8 +548,8 @@
 
 AXIS2_EXTERN int AXIS2_CALL
 axutil_url_get_port(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     if (!url->port)
     {
@@ -564,11 +560,10 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_url_set_path(
-    axutil_url_t * url,
-    const axutil_env_t * env,
+    axutil_url_t *url,
+    const axutil_env_t *env,
     axis2_char_t * path)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, path, AXIS2_FAILURE);
     if (url->path)
     {
@@ -580,20 +575,19 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axutil_url_get_path(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     return url->path;
 }
 
 AXIS2_EXTERN axutil_url_t *AXIS2_CALL
 axutil_url_clone(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     axis2_char_t *temp = NULL;
     axutil_url_t *ret = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
 
     if (url->path && url->query)
     {
@@ -619,12 +613,11 @@
 
 AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
 axutil_url_to_uri(
-    axutil_url_t * url,
-    const axutil_env_t * env)
+    axutil_url_t *url,
+    const axutil_env_t *env)
 {
     axis2_char_t *url_str = NULL;
     axutil_uri_t *uri = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
     url_str = axutil_url_to_external_form(url, env);
     uri = axutil_uri_parse_string(env, url_str);
     return uri;
@@ -632,9 +625,9 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL 
 axutil_url_encode (
-    const axutil_env_t * env,
-    axis2_char_t * dest,
-    axis2_char_t * buff, int len)
+    const axutil_env_t *env,
+    axis2_char_t *dest,
+    axis2_char_t *buff, int len)
 {
     axis2_char_t string[4];
     axis2_char_t *expand_buffer;

Modified: webservices/axis2/trunk/c/util/src/utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/utils.c?rev=643999&r1=643998&r2=643999&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/utils.c (original)
+++ webservices/axis2/trunk/c/util/src/utils.c Wed Apr  2 11:06:28 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
@@ -26,11 +25,11 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_parse_rest_url_for_params(
-    const axutil_env_t * env,
-    const axis2_char_t * tmpl,
-    const axis2_char_t * url,
-    int * match_count,
-    axis2_char_t **** matches)
+    const axutil_env_t *env,
+    const axis2_char_t *tmpl,
+    const axis2_char_t *url,
+    int *match_count,
+    axis2_char_t ****matches)
 {
     axis2_char_t ***ret = NULL;
     axis2_char_t *tmp1 = NULL;
@@ -48,7 +47,6 @@
     int i = 0;
     int j = 0;
     axis2_bool_t in_tok = AXIS2_FALSE;
-    AXIS2_ENV_CHECK(env, NULL);
 
     tmp2 = AXIS2_MALLOC(env->allocator, 2 * (sizeof(axis2_char_t *)));
     memset(tmp2, 0, 2 * sizeof(axis2_char_t *));
@@ -91,6 +89,7 @@
     /* Validation of Template */
     i = (int)strlen(resource);
     /* We are sure that the difference lies within the int range */
+
     if (!strchr(resource, '{') && !strchr(resource, '}'))
     {
         i = 0;
@@ -160,7 +159,9 @@
         url_resource = axutil_strdup(env, url);
     }
     i = (int)strlen(url_resource);
+
     /* We are sure that the difference lies within the int range */
+
     if (url_resource[i] == '/')
     {
         url_resource[i] = '\0';
@@ -184,6 +185,7 @@
     tmp1 = resource;
 
     /* Simplest case match */
+
     if (!strchr(resource, '{'))
     {
         if (strcmp(resource, url_resource) == 0)
@@ -394,15 +396,14 @@
 
 AXIS2_EXTERN axis2_char_t **AXIS2_CALL
 axutil_parse_request_url_for_svc_and_op(
-    const axutil_env_t * env,
-    const axis2_char_t * request)
+    const axutil_env_t *env,
+    const axis2_char_t *request)
 {
     axis2_char_t **ret = NULL;
     axis2_char_t *service_str = NULL;
     axis2_char_t *tmp = NULL;
     axis2_bool_t loop_state = AXIS2_TRUE;
     int i = 0;
-    AXIS2_ENV_CHECK(env, NULL);
     ret = AXIS2_MALLOC(env->allocator, 2 * (sizeof(axis2_char_t *)));
     memset(ret, 0, 2 * sizeof(axis2_char_t *));
     tmp = (axis2_char_t *) request;
@@ -467,8 +468,8 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axutil_xml_quote_string(
-    const axutil_env_t * env,
-    const axis2_char_t * s,
+    const axutil_env_t *env,
+    const axis2_char_t *s,
     axis2_bool_t quotes)
 {
     const char *scan;
@@ -539,9 +540,9 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axutil_url_decode(
-    const axutil_env_t * env,
-    axis2_char_t * dest,
-    axis2_char_t * src)
+    const axutil_env_t *env,
+    axis2_char_t *dest,
+    axis2_char_t *src)
 {
     AXIS2_PARAM_CHECK(env->error, dest, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, src, AXIS2_FAILURE);

Modified: webservices/axis2/trunk/c/util/src/uuid_gen.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/uuid_gen.c?rev=643999&r1=643998&r2=643999&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/uuid_gen.c (original)
+++ webservices/axis2/trunk/c/util/src/uuid_gen.c Wed Apr  2 11:06:28 2008
@@ -20,7 +20,7 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 axutil_uuid_gen(
-    const axutil_env_t * env)
+    const axutil_env_t *env)
 {
 
     axis2_char_t *str = AXIS2_MALLOC(env->allocator, 40 * sizeof(char));
@@ -28,6 +28,7 @@
     if (!str)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_UUID_GEN_FAILED, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "AXIS2_ERROR_UUID_GEN_FAILED");
         return NULL;
     }
     return str;

Modified: webservices/axis2/trunk/c/util/src/version.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/version.c?rev=643999&r1=643998&r2=643999&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/version.c (original)
+++ webservices/axis2/trunk/c/util/src/version.c Wed Apr  2 11:06:28 2008
@@ -20,7 +20,7 @@
 
 AXIS2_EXTERN void AXIS2_CALL
 axis2_version(
-    axis2_version_t * pvsn)
+    axis2_version_t *pvsn)
 {
     pvsn->major = AXIS2_MAJOR_VERSION;
     pvsn->minor = AXIS2_MINOR_VERSION;



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