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 sh...@apache.org on 2009/08/18 12:15:53 UTC

svn commit: r805347 [11/31] - in /webservices/axis2/trunk/c/src: core/addr/ core/clientapi/ core/context/ core/deployment/ core/description/ core/engine/ core/phaseresolver/ core/receivers/ core/transport/amqp/receiver/ core/transport/amqp/receiver/qpi...

Modified: webservices/axis2/trunk/c/src/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/svc.c?rev=805347&r1=805346&r2=805347&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/src/core/description/svc.c Tue Aug 18 10:15:49 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -120,8 +119,8 @@
     /** Base description struct */
     axis2_desc_t *base;
 
-	/* Mutex to avoid loading the same service dll twice */
-	axutil_thread_mutex_t *mutex;
+    /* Mutex to avoid loading the same service dll twice */
+    axutil_thread_mutex_t *mutex;
 };
 
 AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
@@ -130,8 +129,8 @@
 {
     axis2_svc_t *svc = NULL;
 
-    svc = (axis2_svc_t *) AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_t));
-    if (!svc)
+    svc = (axis2_svc_t *)AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_t));
+    if(!svc)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
@@ -169,102 +168,92 @@
     svc->base = NULL;
 
     svc->param_container = axutil_param_container_create(env);
-    if (!svc->param_container)
+    if(!svc->param_container)
     {
         axis2_svc_free(svc, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service param container creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service param container creation failed");
         return NULL;
     }
 
     svc->flow_container = axis2_flow_container_create(env);
-    if (!svc->flow_container)
+    if(!svc->flow_container)
     {
         axis2_svc_free(svc, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service flow container creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service flow container creation failed");
         return NULL;
     }
 
     svc->op_alias_map = axutil_hash_make(env);
-    if (!svc->op_alias_map)
+    if(!svc->op_alias_map)
     {
         axis2_svc_free(svc, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service operation alias map creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service operation alias map creation failed");
         return NULL;
     }
 
     svc->op_action_map = axutil_hash_make(env);
-    if (!svc->op_action_map)
+    if(!svc->op_action_map)
     {
         axis2_svc_free(svc, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service operation action map creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service operation action map creation failed");
         return NULL;
     }
 
     svc->op_rest_map = axutil_hash_make(env);
-    if (!svc->op_rest_map)
+    if(!svc->op_rest_map)
     {
         axis2_svc_free(svc, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service operation rest map creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service operation rest map creation failed");
         return NULL;
     }
 
     /** Create module list of default size */
     svc->module_list = axutil_array_list_create(env, 0);
-    if (!svc->module_list)
+    if(!svc->module_list)
     {
         axis2_svc_free(svc, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service module list creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service module list creation failed");
         return NULL;
     }
 
-    svc->schema_list = axutil_array_list_create(env,
-                                                AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);
-    if (!svc->schema_list)
+    svc->schema_list = axutil_array_list_create(env, AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);
+    if(!svc->schema_list)
     {
         axis2_svc_free(svc, env);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service schema list creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service schema list creation failed");
         return NULL;
     }
 
-    svc->engaged_module_list = axutil_array_list_create(env,
-                                                    AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);
-    if (!svc->engaged_module_list)
+    svc->engaged_module_list = axutil_array_list_create(env, AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);
+    if(!svc->engaged_module_list)
     {
         axis2_svc_free(svc, env);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service engaged modules list creation failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service engaged modules list creation failed");
         return NULL;
     }
 
     svc->schema_loc_adjusted = AXIS2_FALSE;
-    if (svc->schema_target_ns_prefix)
+    if(svc->schema_target_ns_prefix)
     {
         AXIS2_FREE(env->allocator, svc->schema_target_ns_prefix);
         svc->schema_target_ns_prefix = NULL;
     }
     svc->schema_target_ns_prefix = axutil_strdup(env, "ns");
 
-    if (svc->target_ns)
+    if(svc->target_ns)
     {
         AXIS2_FREE(env->allocator, svc->target_ns);
         svc->target_ns = NULL;
     }
     svc->target_ns = axutil_strdup(env, "http://ws.apache.org/axis2");
 
-    if (svc->target_ns_prefix)
+    if(svc->target_ns_prefix)
     {
         AXIS2_FREE(env->allocator, svc->target_ns_prefix);
         svc->target_ns_prefix = NULL;
@@ -273,19 +262,19 @@
     svc->sc_calc_count = 0;
 
     svc->base = axis2_desc_create(env);
-    if (!svc->base)
+    if(!svc->base)
     {
         axis2_svc_free(svc, env);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service base creation failed");
         return NULL;
     }
-	svc->mutex = axutil_thread_mutex_create(env->allocator, AXIS2_THREAD_MUTEX_DEFAULT);
-	if (!svc->mutex)
-	{
-		axis2_svc_free(svc, env);
-		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service mutex creation failed");
+    svc->mutex = axutil_thread_mutex_create(env->allocator, AXIS2_THREAD_MUTEX_DEFAULT);
+    if(!svc->mutex)
+    {
+        axis2_svc_free(svc, env);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service mutex creation failed");
         return NULL;
-	}
+    }
     return svc;
 }
 
@@ -300,21 +289,19 @@
     AXIS2_PARAM_CHECK(env->error, qname, NULL);
 
     svc = axis2_svc_create(env);
-    if (!svc)
+    if(!svc)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service creation failed for name %s", 
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service creation failed for name %s",
             axutil_qname_get_localpart(qname, env));
         return NULL;
     }
 
     status = axis2_svc_set_qname(svc, env, qname);
-    if (AXIS2_FAILURE == status)
+    if(AXIS2_FAILURE == status)
     {
         axis2_svc_free(svc, env);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Setting name %s to service failed", 
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Setting name %s to service failed",
             axutil_qname_get_localpart(qname, env));
         return NULL;
     }
@@ -327,27 +314,27 @@
     axis2_svc_t * svc,
     const axutil_env_t * env)
 {
-    if (svc->impl_class)
+    if(svc->impl_class)
     {
-        AXIS2_SVC_SKELETON_FREE((axis2_svc_skeleton_t *) svc->impl_class, env);
+        AXIS2_SVC_SKELETON_FREE((axis2_svc_skeleton_t *)svc->impl_class, env);
     }
-    if (svc->param_container)
+    if(svc->param_container)
     {
         axutil_param_container_free(svc->param_container, env);
     }
 
-    if (svc->flow_container)
+    if(svc->flow_container)
     {
         axis2_flow_container_free(svc->flow_container, env);
     }
 
-    if (svc->filename)
+    if(svc->filename)
     {
         AXIS2_FREE(env->allocator, svc->filename);
         svc->filename = NULL;
     }
 
-    if (svc->svc_desc)
+    if(svc->svc_desc)
     {
         AXIS2_FREE(env->allocator, svc->svc_desc);
         svc->svc_desc = NULL;
@@ -355,17 +342,17 @@
 
     svc->parent = NULL;
 
-    if (svc->module_list)
+    if(svc->module_list)
     {
         int i = 0;
         int size = 0;
 
         size = axutil_array_list_size(svc->module_list, env);
-        for (i = 0; i < size; i++)
+        for(i = 0; i < size; i++)
         {
             axutil_qname_t *qname = NULL;
             qname = axutil_array_list_get(svc->module_list, env, i);
-            if (qname)
+            if(qname)
             {
                 axutil_qname_free(qname, env);
             }
@@ -373,38 +360,36 @@
         axutil_array_list_free(svc->module_list, env);
     }
 
-    if (svc->schema_list)
+    if(svc->schema_list)
     {
         axutil_array_list_free(svc->schema_list, env);
     }
 
-    if (svc->engaged_module_list)
+    if(svc->engaged_module_list)
     {
         axutil_array_list_free(svc->engaged_module_list, env);
     }
 
-    if (svc->axis_svc_name)
+    if(svc->axis_svc_name)
     {
         AXIS2_FREE(env->allocator, svc->axis_svc_name);
         svc->axis_svc_name = NULL;
     }
 
-    if (svc->op_alias_map)
+    if(svc->op_alias_map)
     {
         axutil_hash_index_t *hi = NULL;
         void *val = NULL;
 
-        for (hi = axutil_hash_first(svc->op_alias_map, env); hi;
-             hi = axutil_hash_next(env, hi))
+        for(hi = axutil_hash_first(svc->op_alias_map, env); hi; hi = axutil_hash_next(env, hi))
         {
             axutil_hash_this(hi, NULL, NULL, &val);
 
-            if (val)
+            if(val)
             {
-                if (axis2_op_is_from_module((axis2_op_t *) val, env) ==
-                    AXIS2_FALSE)
+                if(axis2_op_is_from_module((axis2_op_t *)val, env) == AXIS2_FALSE)
                 {
-                    axis2_op_free((axis2_op_t *) val, env);
+                    axis2_op_free((axis2_op_t *)val, env);
                 }
                 val = NULL;
             }
@@ -413,79 +398,78 @@
         axutil_hash_free(svc->op_alias_map, env);
     }
 
-    if (svc->op_action_map)
+    if(svc->op_action_map)
     {
         axutil_hash_index_t *hi = NULL;
         const void *key = NULL;
 
-        for (hi = axutil_hash_first(svc->op_action_map, env); hi;
-             hi = axutil_hash_next(env, hi))
+        for(hi = axutil_hash_first(svc->op_action_map, env); hi; hi = axutil_hash_next(env, hi))
         {
             axutil_hash_this(hi, &key, NULL, NULL);
 
-            if (key)
+            if(key)
             {
-                AXIS2_FREE(env->allocator, (axis2_char_t *) key);
+                AXIS2_FREE(env->allocator, (axis2_char_t *)key);
                 key = NULL;
             }
         }
         axutil_hash_free(svc->op_action_map, env);
     }
 
-    if (svc->op_rest_map)
+    if(svc->op_rest_map)
     {
         axis2_core_utils_free_rest_map(env, svc->op_rest_map);
     }
 
-    if (svc->schema_target_ns_prefix)
+    if(svc->schema_target_ns_prefix)
     {
         AXIS2_FREE(env->allocator, svc->schema_target_ns_prefix);
         svc->schema_target_ns_prefix = NULL;
     }
 
-    if (svc->target_ns)
+    if(svc->target_ns)
     {
         AXIS2_FREE(env->allocator, svc->target_ns);
         svc->target_ns = NULL;
     }
 
-    if (svc->wsdl_path)
+    if(svc->wsdl_path)
     {
         AXIS2_FREE(env->allocator, svc->wsdl_path);
         svc->wsdl_path = NULL;
     }
 
-    if (svc->folder_path)
+    if(svc->folder_path)
     {
         AXIS2_FREE(env->allocator, svc->folder_path);
         svc->folder_path = NULL;
     }
 
-    if (svc->target_ns_prefix)
+    if(svc->target_ns_prefix)
     {
         AXIS2_FREE(env->allocator, svc->target_ns_prefix);
         svc->target_ns_prefix = NULL;
     }
 
-    if (svc->qname)
+    if(svc->qname)
     {
         axutil_qname_free(svc->qname, env);
     }
 
-    if (svc->style)
+    if(svc->style)
     {
         AXIS2_FREE(env->allocator, svc->style);
     }
 
-    if (svc->base)
+    if(svc->base)
     {
         axis2_desc_free(svc->base, env);
     }
-	if (svc->mutex)
-	{
-		axutil_thread_mutex_destroy(svc->mutex);
-	}
-    if (svc)
+    if(svc->mutex)
+    {
+        axutil_thread_mutex_destroy(svc->mutex);
+    }
+    if(svc)
     {
         AXIS2_FREE(env->allocator, svc);
         svc = NULL;
@@ -511,42 +495,40 @@
     AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE);
     svcname = axis2_svc_get_name(svc, env);
     qname = axis2_op_get_qname(op, env);
-    if (qname)
+    if(qname)
         key = axutil_qname_get_localpart(qname, env);
     mappings_list = axis2_op_get_wsamapping_list(op, env);
     /* Adding action mappings into service */
-    if (mappings_list)
+    if(mappings_list)
         size = axutil_array_list_size(mappings_list, env);
-    for (j = 0; j < size; j++)
+    for(j = 0; j < size; j++)
     {
         axis2_char_t *mapping = NULL;
 
-        mapping =
-            (axis2_char_t *) axutil_array_list_get(mappings_list, env, j);
+        mapping = (axis2_char_t *)axutil_array_list_get(mappings_list, env, j);
         status = axis2_svc_add_mapping(svc, env, mapping, op);
-        if (AXIS2_SUCCESS != status)
+        if(AXIS2_SUCCESS != status)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Adding operation %s to service %s mapping list failed", 
-                svcname, key);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "Adding operation %s to service %s mapping list failed", svcname, key);
             return status;
         }
     }
 
     status = axis2_op_set_parent(op, env, svc);
-    if (AXIS2_SUCCESS != status)
+    if(AXIS2_SUCCESS != status)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Setting service %s as operation %s parent failed", svcname, key);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Setting service %s as operation %s parent failed",
+            svcname, key);
         return status;
     }
     msg_recv = axis2_op_get_msg_recv(op, env);
-    if (msg_recv == NULL)
+    if(msg_recv == NULL)
     {
         msg_recv = axis2_desc_builder_load_default_msg_recv(env);
         axis2_op_set_msg_recv(op, env, msg_recv);
     }
-    if (key)
+    if(key)
     {
         /* If service defines the operation, then we should not override with module level 
          * operation. Module operations are global. If any setting to be modified, those operations
@@ -580,29 +562,28 @@
     nc_tmp = nc_name;
 
     op = axutil_hash_get(svc->op_alias_map, nc_tmp, AXIS2_HASH_KEY_STRING);
-    if (op)
+    if(op)
     {
         return op;
     }
     op = axutil_hash_get(svc->op_action_map, nc_tmp, AXIS2_HASH_KEY_STRING);
-    if (op)
+    if(op)
     {
         return op;
     }
-    
-    if (*nc_tmp && svc->op_action_map)
+
+    if(*nc_tmp && svc->op_action_map)
     {
         axutil_hash_index_t *hi = NULL;
         const void *key = NULL;
 
-        for (hi = axutil_hash_first(svc->op_action_map, env); hi;
-             hi = axutil_hash_next(env, hi))
+        for(hi = axutil_hash_first(svc->op_action_map, env); hi; hi = axutil_hash_next(env, hi))
         {
             axutil_hash_this(hi, &key, NULL, NULL);
 
             nc_tmp = nc_name;
 
-            if (key)
+            if(key)
             {
                 axis2_char_t *search = NULL;
                 axis2_bool_t match_start = AXIS2_TRUE;
@@ -610,14 +591,14 @@
 
                 search = (axis2_char_t *)key;
 
-                if (!axutil_strchr(search, '*'))
+                if(!axutil_strchr(search, '*'))
                 {
-                    if (axutil_strstr(nc_tmp, search))
+                    if(axutil_strstr(nc_tmp, search))
                     {
                         axis2_char_t *comp_tmp = NULL;
 
                         comp_tmp = axutil_strstr(nc_tmp, search);
-                        if (strlen(comp_tmp) == strlen (search))
+                        if(strlen(comp_tmp) == strlen(search))
                         {
                             nc_tmp = (axis2_char_t *)key;
                             is_matched = AXIS2_TRUE;
@@ -627,52 +608,52 @@
                     continue;
                 }
 
-                if (search[0] == '*')
+                if(search[0] == '*')
                 {
                     search++;
-                    if (!*search)
+                    if(!*search)
                     {
                         nc_tmp = (axis2_char_t *)key;
                         is_matched = AXIS2_TRUE;
                         break;
                     }
-                    else if (axutil_strchr(search, '*'))
+                    else if(axutil_strchr(search, '*'))
                     {
                         continue;
                     }
                     match_start = AXIS2_FALSE;
                 }
-                while (search && *search)
+                while(search && *search)
                 {
                     int length = 0;
                     axis2_char_t *loc_tmp = NULL;
 
-                    if (search_tmp)
+                    if(search_tmp)
                     {
                         AXIS2_FREE(env->allocator, search_tmp);
                         search_tmp = NULL;
                     }
                     loc_tmp = axutil_strchr(search, '*');
-                    if (loc_tmp && *loc_tmp)
+                    if(loc_tmp && *loc_tmp)
                     {
-                        if (!loc_tmp[1])
+                        if(!loc_tmp[1])
                         {
                             is_matched = AXIS2_TRUE;
                             break;
                         }
                         length = (int)(loc_tmp - search);
                         /* We are sure that the difference lies within the int range */
-                        search_tmp = (axis2_char_t *) (AXIS2_MALLOC (env->allocator,
-                                          sizeof (axis2_char_t) * (length + 1)));
+                        search_tmp = (axis2_char_t *)(AXIS2_MALLOC(env->allocator,
+                            sizeof(axis2_char_t) * (length + 1)));
                         strncpy(search_tmp, search, length);
                         search_tmp[length] = '\0';
                     }
-                    else if (axutil_strstr(nc_tmp, search))
+                    else if(axutil_strstr(nc_tmp, search))
                     {
                         axis2_char_t *comp_tmp = NULL;
 
                         comp_tmp = axutil_strstr(nc_tmp, search);
-                        if (strlen(comp_tmp) == strlen (search))
+                        if(strlen(comp_tmp) == strlen(search))
                         {
                             nc_tmp = (axis2_char_t *)key;
                             is_matched = AXIS2_TRUE;
@@ -684,13 +665,13 @@
                     {
                         break;
                     }
-                    if (search_tmp && axutil_strstr(nc_tmp, search_tmp))
+                    if(search_tmp && axutil_strstr(nc_tmp, search_tmp))
                     {
-                        if (match_start && !(axutil_strncmp(nc_tmp, search, length) == 0))
+                        if(match_start && !(axutil_strncmp(nc_tmp, search, length) == 0))
                         {
                             break;
                         }
-                        else if (!match_start)
+                        else if(!match_start)
                         {
                             match_start = AXIS2_TRUE;
                         }
@@ -702,12 +683,12 @@
                     search += axutil_strlen(search_tmp) + 1;
                     nc_tmp = axutil_strstr(nc_tmp, search_tmp) + axutil_strlen(search_tmp);
                 }
-                if (search_tmp)
+                if(search_tmp)
                 {
                     AXIS2_FREE(env->allocator, search_tmp);
                     search_tmp = NULL;
                 }
-                if (is_matched || !*search)
+                if(is_matched || !*search)
                 {
                     nc_tmp = (axis2_char_t *)key;
                     is_matched = AXIS2_TRUE;
@@ -716,13 +697,13 @@
             }
         }
     }
-    if (!is_matched)
+    if(!is_matched)
     {
         nc_tmp = nc_name;
     }
 
     op = axutil_hash_get(svc->op_alias_map, nc_tmp, AXIS2_HASH_KEY_STRING);
-    if (op)
+    if(op)
     {
         return op;
     }
@@ -746,12 +727,12 @@
     AXIS2_PARAM_CHECK(env->error, method, NULL);
     AXIS2_PARAM_CHECK(env->error, location, NULL);
 
-    loc_str_tmp = (axis2_char_t *) location; /* Casted to facilitate loop */
-    if (loc_str_tmp[1] == '/')
+    loc_str_tmp = (axis2_char_t *)location; /* Casted to facilitate loop */
+    if(loc_str_tmp[1] == '/')
     {
         loc_str_tmp++;
     } /* ignore any '/' at the beginning */
-    if (strchr(loc_str_tmp, '?'))
+    if(strchr(loc_str_tmp, '?'))
     {
         axis2_char_t *temp = NULL;
 
@@ -762,7 +743,7 @@
     {
         axis2_char_t *temp = NULL;
         temp = strchr(loc_str_tmp, '{');
-        if (temp)
+        if(temp)
         {
             loc_str_tmp = temp;
         }
@@ -771,13 +752,13 @@
             loc_str_tmp += strlen(loc_str_tmp);
             break;
         }
-    } while (loc_str_tmp[1] &&
-             loc_str_tmp[1] == '{');
+    }
+    while(loc_str_tmp[1] && loc_str_tmp[1] == '{');
 
-    loc_str = (axis2_char_t *) axutil_strmemdup(location, (loc_str_tmp - location), env);
+    loc_str = (axis2_char_t *)axutil_strmemdup(location, (loc_str_tmp - location), env);
 
     rindex = axutil_rindex(loc_str, '/');
-    if (rindex && *rindex)
+    if(rindex && *rindex)
     {
         loc_str_tmp = axutil_string_substring_ending_at(loc_str, (int)(rindex - loc_str));
         /* We are sure that the difference lies within the int range */
@@ -787,14 +768,12 @@
         loc_str_tmp = loc_str;
     }
 
-    plen = axutil_strlen (method) + axutil_strlen (loc_str_tmp) + 2;
-    key = (axis2_char_t *) (AXIS2_MALLOC (env->allocator,
-                                          sizeof (axis2_char_t) * plen));
-    sprintf (key, "%s:%s", method, loc_str_tmp);
-    AXIS2_FREE (env->allocator, loc_str);
-    op_list = (axutil_array_list_t *) axutil_hash_get(svc->op_rest_map,
-                                                      key, AXIS2_HASH_KEY_STRING);
-    AXIS2_FREE (env->allocator, key);
+    plen = axutil_strlen(method) + axutil_strlen(loc_str_tmp) + 2;
+    key = (axis2_char_t *)(AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * plen));
+    sprintf(key, "%s:%s", method, loc_str_tmp);
+    AXIS2_FREE(env->allocator, loc_str);
+    op_list = (axutil_array_list_t *)axutil_hash_get(svc->op_rest_map, key, AXIS2_HASH_KEY_STRING);
+    AXIS2_FREE(env->allocator, key);
     return op_list;
 }
 
@@ -806,8 +785,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, nc_name, NULL);
 
-    return (axis2_op_t *) axutil_hash_get(svc->op_alias_map, nc_name,
-                                          AXIS2_HASH_KEY_STRING);
+    return (axis2_op_t *)axutil_hash_get(svc->op_alias_map, nc_name, AXIS2_HASH_KEY_STRING);
 }
 
 AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
@@ -827,10 +805,9 @@
     AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
 
     svc->parent = svc_grp;
-    if (svc_grp)
+    if(svc_grp)
     {
-        axis2_desc_set_parent(svc->base, env,
-                              axis2_svc_grp_get_base(svc_grp, env));
+        axis2_desc_set_parent(svc->base, env, axis2_svc_grp_get_base(svc_grp, env));
     }
 
     return AXIS2_SUCCESS;
@@ -851,14 +828,14 @@
     const axutil_qname_t * qname)
 {
     AXIS2_PARAM_CHECK(env->error, qname, AXIS2_FAILURE);
-    if (svc->qname)
+    if(svc->qname)
     {
         axutil_qname_free(svc->qname, env);
     }
 
-    if (qname)
+    if(qname)
     {
-        svc->qname = axutil_qname_clone((axutil_qname_t *) qname, env);
+        svc->qname = axutil_qname_clone((axutil_qname_t *)qname, env);
     }
     return AXIS2_SUCCESS;
 }
@@ -882,17 +859,14 @@
     AXIS2_PARAM_CHECK(env->error, param, AXIS2_FAILURE);
     paramname = axutil_param_get_name(param, env);
 
-    if (axis2_svc_is_param_locked(svc, env, axutil_param_get_name(param, env)))
+    if(axis2_svc_is_param_locked(svc, env, axutil_param_get_name(param, env)))
     {
-        AXIS2_ERROR_SET(env->error,
-                        AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Parameter %s is locked for service %s", paramname, svcname);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Parameter %s is locked for service %s", paramname,
+            svcname);
         return AXIS2_FAILURE;
     }
-    return axutil_param_container_add_param(svc->param_container, env,
-                                            param);
+    return axutil_param_container_add_param(svc->param_container, env, param);
 }
 
 AXIS2_EXTERN axutil_param_t *AXIS2_CALL
@@ -905,7 +879,7 @@
     AXIS2_PARAM_CHECK(env->error, name, NULL);
 
     param = axutil_param_container_get_param(svc->param_container, env, name);
-    if (!param && svc->parent)
+    if(!param && svc->parent)
     {
         param = axis2_svc_grp_get_param(svc->parent, env, name);
     }
@@ -936,14 +910,14 @@
     /* Checking the locked value of parent */
 
     parent = axis2_svc_get_parent(svc, env);
-    if (parent)
+    if(parent)
         locked = axis2_svc_grp_is_param_locked(parent, env, param_name);
-    if (parent && locked)
+    if(parent && locked)
     {
         return AXIS2_TRUE;
     }
     param = axis2_svc_get_param(svc, env, param_name);
-    if (param)
+    if(param)
     {
         ret = axutil_param_is_locked(param, env);
     }
@@ -968,16 +942,16 @@
 
     svcname = axis2_svc_get_name(svc, env);
     phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
-    if (!phase_resolver)
+    if(!phase_resolver)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Creating phase resolver failed for service %s", svcname);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating phase resolver failed for service %s",
+            svcname);
 
         return AXIS2_FAILURE;
     }
 
     status = axis2_phase_resolver_engage_module_to_svc(phase_resolver, env, svc, module_desc);
-    if (status)
+    if(status)
     {
         const axutil_qname_t *qname = NULL;
         status = axutil_array_list_add(svc->engaged_module_list, env, module_desc);
@@ -985,7 +959,7 @@
         axis2_svc_add_module_qname(svc, env, qname);
     }
 
-    if (phase_resolver)
+    if(phase_resolver)
     {
         axis2_phase_resolver_free(phase_resolver, env);
     }
@@ -1001,21 +975,19 @@
     const axutil_env_t * env,
     axutil_qname_t * module_qname)
 {
-    int i = 0,
-        size = 0;
+    int i = 0, size = 0;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Entry:axis2_svc_is_module_engaged");
     size = axutil_array_list_size(svc->engaged_module_list, env);
-    for (i = 0; i < size; i++)
+    for(i = 0; i < size; i++)
     {
         const axutil_qname_t *module_qname_l = NULL;
         axis2_module_desc_t *module_desc_l = NULL;
 
-        module_desc_l =
-            (axis2_module_desc_t *) axutil_array_list_get(svc->engaged_module_list,
-                                                          env, i);
+        module_desc_l = (axis2_module_desc_t *)axutil_array_list_get(svc->engaged_module_list, env,
+            i);
         module_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
 
-        if (axutil_qname_equals(module_qname, env, module_qname_l))
+        if(axutil_qname_equals(module_qname, env, module_qname_l))
         {
             return AXIS2_TRUE;
         }
@@ -1048,15 +1020,13 @@
     svcname = axis2_svc_get_name(svc, env);
 
     phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
-    if (!phase_resolver)
+    if(!phase_resolver)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Creating phase resolver failed for service %s", svcname);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating phase resolver failed for service %s",
+            svcname);
         return AXIS2_FAILURE;
     }
-    status =
-        axis2_phase_resolver_disengage_module_from_svc(phase_resolver, env, svc,
-                                                       module_desc);
+    status = axis2_phase_resolver_disengage_module_from_svc(phase_resolver, env, svc, module_desc);
 
     axis2_phase_resolver_free(phase_resolver, env);
 
@@ -1089,55 +1059,50 @@
     AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE);
     svcname = axis2_svc_get_name(svc, env);
-    modname = axutil_qname_get_localpart(axis2_module_desc_get_qname(module_desc, 
-        env), env);
+    modname = axutil_qname_get_localpart(axis2_module_desc_get_qname(module_desc, env), env);
     map = axis2_module_desc_get_all_ops(module_desc, env);
-    phase_resolver = axis2_phase_resolver_create_with_config_and_svc(env, conf,
-                                                                     svc);
-    if (!phase_resolver)
+    phase_resolver = axis2_phase_resolver_create_with_config_and_svc(env, conf, svc);
+    if(!phase_resolver)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Creating phase resolver failed for service %s", svcname);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating phase resolver failed for service %s",
+            svcname);
         return AXIS2_FAILURE;
     }
-    for (index = axutil_hash_first(map, env); index; index =
-         axutil_hash_next(env, index))
+    for(index = axutil_hash_first(map, env); index; index = axutil_hash_next(env, index))
     {
         void *v = NULL;
         axutil_hash_this(index, NULL, NULL, &v);
-        op_desc = (axis2_op_t *) v;
-        opname = axutil_qname_get_localpart(axis2_op_get_qname(op_desc, env), 
-            env);
-        status =
-            axis2_phase_resolver_build_execution_chains_for_module_op(phase_resolver, env, op_desc);
+        op_desc = (axis2_op_t *)v;
+        opname = axutil_qname_get_localpart(axis2_op_get_qname(op_desc, env), env);
+        status = axis2_phase_resolver_build_execution_chains_for_module_op(phase_resolver, env,
+            op_desc);
 
-        if (AXIS2_SUCCESS != status)
+        if(AXIS2_SUCCESS != status)
         {
-            if (phase_resolver)
+            if(phase_resolver)
             {
                 axis2_phase_resolver_free(phase_resolver, env);
             }
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Builidng module operation %s failed for module %s", opname, 
-                modname);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "Builidng module operation %s failed for module %s", opname, modname);
             return status;
         }
 
         status = axis2_svc_add_op(svc, env, op_desc);
-        if (AXIS2_SUCCESS != status)
+        if(AXIS2_SUCCESS != status)
         {
-            if (phase_resolver)
+            if(phase_resolver)
             {
                 axis2_phase_resolver_free(phase_resolver, env);
             }
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Adding operation %s to service %s failed", opname, svcname);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Adding operation %s to service %s failed",
+                opname, svcname);
             return status;
         }
 
     }
 
-    if (phase_resolver)
+    if(phase_resolver)
     {
         axis2_phase_resolver_free(phase_resolver, env);
     }
@@ -1150,7 +1115,7 @@
     const axis2_svc_t * svc,
     const axutil_env_t * env)
 {
-    if (svc->qname)
+    if(svc->qname)
     {
         return axutil_qname_get_localpart(svc->qname, env);
     }
@@ -1166,13 +1131,13 @@
 {
     AXIS2_PARAM_CHECK(env->error, axis_svc_name, AXIS2_FAILURE);
 
-    if (svc->axis_svc_name)
+    if(svc->axis_svc_name)
     {
         AXIS2_FREE(env->allocator, svc->axis_svc_name);
         svc->axis_svc_name = NULL;
     }
     svc->axis_svc_name = axutil_strdup(env, axis_svc_name);
-    if (!svc->axis_svc_name)
+    if(!svc->axis_svc_name)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
@@ -1213,13 +1178,13 @@
 {
     AXIS2_PARAM_CHECK(env->error, filename, AXIS2_FAILURE);
 
-    if (svc->filename)
+    if(svc->filename)
     {
         AXIS2_FREE(env->allocator, svc->filename);
         svc->filename = NULL;
     }
-    svc->filename = (axis2_char_t *) axutil_strdup(env, filename);
-    if (!svc->filename)
+    svc->filename = (axis2_char_t *)axutil_strdup(env, filename);
+    if(!svc->filename)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
@@ -1244,13 +1209,13 @@
 {
     AXIS2_PARAM_CHECK(env->error, svc_desc, AXIS2_FAILURE);
 
-    if (svc->svc_desc)
+    if(svc->svc_desc)
     {
         AXIS2_FREE(env->allocator, svc->svc_desc);
         svc->svc_desc = NULL;
     }
-    svc->svc_desc = (axis2_char_t *) axutil_strdup(env, svc_desc);
-    if (!svc->svc_desc)
+    svc->svc_desc = (axis2_char_t *)axutil_strdup(env, svc_desc);
+    if(!svc->svc_desc)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
@@ -1269,8 +1234,8 @@
     AXIS2_PARAM_CHECK(env->error, mapping_key, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, op_desc, AXIS2_FAILURE);
 
-    axutil_hash_set(svc->op_action_map, axutil_strdup(env, mapping_key), 
-            AXIS2_HASH_KEY_STRING, op_desc);
+    axutil_hash_set(svc->op_action_map, axutil_strdup(env, mapping_key), AXIS2_HASH_KEY_STRING,
+        op_desc);
     return AXIS2_SUCCESS;
 }
 
@@ -1289,43 +1254,41 @@
     axis2_char_t* local_location_str = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
 
-    local_location_str = (axis2_char_t *) location; /* Casted to facilitate loop */
+    local_location_str = (axis2_char_t *)location; /* Casted to facilitate loop */
 
     /* skip the beginning '/' */
-    if(*local_location_str == '/') 
+    if(*local_location_str == '/')
     {
-        local_location_str ++;
+        local_location_str++;
     }
     question_char = axutil_strchr(local_location_str, '?');
-    if(question_char) 
+    if(question_char)
     {
         *question_char = '\0';
     }
 
     key_len = axutil_strlen(method) + axutil_strlen(local_location_str) + 2;
 
-    mapping_url = (axis2_char_t *) (AXIS2_MALLOC (env->allocator,
-                                              sizeof (axis2_char_t) * key_len));
-    if(!mapping_url) {
-       AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                "No memory. Cannot create the rest mapping url");
-       return AXIS2_FAILURE;
+    mapping_url = (axis2_char_t *)(AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * key_len));
+    if(!mapping_url)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create the rest mapping url");
+        return AXIS2_FAILURE;
     }
 
     sprintf(mapping_url, "%s:%s", method, local_location_str);
 
-    status = axis2_core_utils_prepare_rest_mapping(env,
-                    mapping_url,
-                    svc->op_rest_map,
-                    op_desc);
+    status = axis2_core_utils_prepare_rest_mapping(env, mapping_url, svc->op_rest_map, op_desc);
 
-    if(mapping_url) {
-        AXIS2_FREE(env->allocator, mapping_url);    
+    if(mapping_url)
+    {
+        AXIS2_FREE(env->allocator, mapping_url);
     }
 
     /* restore the question character */
-    if(question_char) {
+    if(question_char)
+    {
         *question_char = '?';
     }
 
@@ -1342,7 +1305,7 @@
 
     AXIS2_PARAM_CHECK(env->error, module_qname, AXIS2_FAILURE);
 
-    qmodule_qname_l = axutil_qname_clone((axutil_qname_t *) module_qname, env);
+    qmodule_qname_l = axutil_qname_clone((axutil_qname_t *)module_qname, env);
     return axutil_array_list_add(svc->module_list, env, qmodule_qname_l);
 }
 
@@ -1370,7 +1333,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, ns, AXIS2_FAILURE);
 
-    if (svc->target_ns)
+    if(svc->target_ns)
     {
         AXIS2_FREE(env->allocator, svc->target_ns);
         svc->target_ns = NULL;
@@ -1395,7 +1358,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, prefix, AXIS2_FAILURE);
 
-    if (svc->target_ns_prefix)
+    if(svc->target_ns_prefix)
     {
         AXIS2_FREE(env->allocator, svc->target_ns_prefix);
         svc->target_ns_prefix = NULL;
@@ -1422,20 +1385,19 @@
 
     AXIS2_PARAM_CHECK(env->error, ns_map, AXIS2_FAILURE);
 
-    if (svc->ns_map)
+    if(svc->ns_map)
     {
-        for (hi = axutil_hash_first(svc->ns_map, env); hi;
-             hi = axutil_hash_next(env, hi))
+        for(hi = axutil_hash_first(svc->ns_map, env); hi; hi = axutil_hash_next(env, hi))
         {
             void *value = NULL;
             void *key = NULL;
-            axutil_hash_this(hi, (const void **) &key, NULL, (void **) &value);
-            if (key)
+            axutil_hash_this(hi, (const void **)&key, NULL, (void **)&value);
+            if(key)
             {
                 AXIS2_FREE(env->allocator, key);
                 key = NULL;
             }
-            if (value)
+            if(value)
             {
                 AXIS2_FREE(env->allocator, value);
                 value = NULL;
@@ -1460,13 +1422,12 @@
 
     new_table = axutil_hash_make(env);
 
-    for (hi = axutil_hash_first(orig_table, env); env;
-         hi = axutil_hash_next(env, hi))
+    for(hi = axutil_hash_first(orig_table, env); env; hi = axutil_hash_next(env, hi))
     {
         void *value = NULL;
         void *key = NULL;
 
-        axutil_hash_this(hi, (const void **) &key, NULL, (void **) &value);
+        axutil_hash_this(hi, (const void **)&key, NULL, (void **)&value);
         axutil_hash_set(new_table, value, AXIS2_HASH_KEY_STRING, key);
     }
     return new_table;
@@ -1521,7 +1482,7 @@
     const axis2_char_t * wsdl_path)
 {
     AXIS2_PARAM_CHECK(env->error, wsdl_path, AXIS2_FAILURE);
-    svc->wsdl_path = (axis2_char_t *) axutil_strdup(env, wsdl_path);
+    svc->wsdl_path = (axis2_char_t *)axutil_strdup(env, wsdl_path);
     return AXIS2_SUCCESS;
 }
 
@@ -1540,7 +1501,7 @@
     const axis2_char_t * folder_path)
 {
     AXIS2_PARAM_CHECK(env->error, folder_path, AXIS2_FAILURE);
-    svc->folder_path = (axis2_char_t *) axutil_strdup(env, folder_path);
+    svc->folder_path = (axis2_char_t *)axutil_strdup(env, folder_path);
     return AXIS2_SUCCESS;
 }
 
@@ -1557,7 +1518,7 @@
     const axis2_svc_t * svc,
     const axutil_env_t * env)
 {
-	return svc->mutex;
+    return svc->mutex;
 }
 
 AXIS2_EXTERN axutil_hash_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/src/core/description/svc_grp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/svc_grp.c?rev=805347&r1=805346&r2=805347&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/svc_grp.c (original)
+++ webservices/axis2/trunk/c/src/core/description/svc_grp.c Tue Aug 18 10:15:49 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -49,10 +48,9 @@
     const axutil_env_t * env)
 {
     axis2_svc_grp_t *svc_grp = NULL;
-    svc_grp = (axis2_svc_grp_t *)
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_grp_t));
+    svc_grp = (axis2_svc_grp_t *)AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_grp_t));
 
-    if (!svc_grp)
+    if(!svc_grp)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
@@ -68,27 +66,25 @@
     svc_grp->base = NULL;
 
     svc_grp->param_container = axutil_param_container_create(env);
-    if (!svc_grp->param_container)
+    if(!svc_grp->param_container)
     {
         axis2_svc_grp_free(svc_grp, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Creating parameter container failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating parameter container failed");
         return NULL;
     }
 
     svc_grp->module_qname_list = axutil_array_list_create(env, 20);
-    if (!svc_grp->module_qname_list)
+    if(!svc_grp->module_qname_list)
     {
         axis2_svc_grp_free(svc_grp, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Creating module qnames list failed");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating module qnames list failed");
         return NULL;
     }
 
     svc_grp->module_list = axutil_array_list_create(env, 0);
-    if (!svc_grp->module_list)
+    if(!svc_grp->module_list)
     {
         axis2_svc_grp_free(svc_grp, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -97,7 +93,7 @@
     }
 
     svc_grp->svcs = axutil_hash_make(env);
-    if (!svc_grp->svcs)
+    if(!svc_grp->svcs)
     {
         axis2_svc_grp_free(svc_grp, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -106,7 +102,7 @@
     }
 
     svc_grp->base = axis2_desc_create(env);
-    if (!svc_grp->base)
+    if(!svc_grp->base)
     {
         axis2_svc_grp_free(svc_grp, env);
         return NULL;
@@ -124,13 +120,12 @@
 
     AXIS2_PARAM_CHECK(env->error, conf, NULL);
 
-    svc_grp = (axis2_svc_grp_t *) axis2_svc_grp_create(env);
-    if (svc_grp)
+    svc_grp = (axis2_svc_grp_t *)axis2_svc_grp_create(env);
+    if(svc_grp)
         svc_grp->parent = conf;
-    if (conf)
+    if(conf)
     {
-        axis2_desc_set_parent(svc_grp->base, env,
-                              axis2_conf_get_base(conf, env));
+        axis2_desc_set_parent(svc_grp->base, env, axis2_conf_get_base(conf, env));
     }
 
     return svc_grp;
@@ -142,38 +137,38 @@
     axis2_svc_grp_t * svc_grp,
     const axutil_env_t * env)
 {
-    if (svc_grp->param_container)
+    if(svc_grp->param_container)
     {
         axutil_param_container_free(svc_grp->param_container, env);
     }
 
-    if (svc_grp->svc_grp_name)
+    if(svc_grp->svc_grp_name)
     {
         AXIS2_FREE(env->allocator, svc_grp->svc_grp_name);
     }
 
-    if (svc_grp->svcs)
+    if(svc_grp->svcs)
     {
         /* services are freed by arch_file_data */
         axutil_hash_free(svc_grp->svcs, env);
     }
 
-    if (svc_grp->module_qname_list)
+    if(svc_grp->module_qname_list)
     {
         axutil_array_list_free(svc_grp->module_qname_list, env);
     }
 
-    if (svc_grp->module_list)
+    if(svc_grp->module_list)
     {
         axutil_array_list_free(svc_grp->module_list, env);
     }
 
-    if (svc_grp->base)
+    if(svc_grp->base)
     {
         axis2_desc_free(svc_grp->base, env);
     }
 
-    if (svc_grp)
+    if(svc_grp)
     {
         AXIS2_FREE(env->allocator, svc_grp);
     }
@@ -186,10 +181,10 @@
     const axutil_env_t * env,
     const axis2_char_t * name)
 {
-    if (svc_grp->svc_grp_name)
+    if(svc_grp->svc_grp_name)
         AXIS2_FREE(env->allocator, svc_grp->svc_grp_name);
     svc_grp->svc_grp_name = axutil_strdup(env, name);
-    if (!svc_grp->svc_grp_name)
+    if(!svc_grp->svc_grp_name)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No Memory");
@@ -219,10 +214,10 @@
 
     AXIS2_PARAM_CHECK(env->error, svc, AXIS2_FAILURE);
 
-    if (!svc_grp->svcs)
+    if(!svc_grp->svcs)
     {
         svc_grp->svcs = axutil_hash_make(env);
-        if (!svc_grp->svcs)
+        if(!svc_grp->svcs)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating services list failed");
             return AXIS2_FAILURE;
@@ -230,23 +225,23 @@
     }
 
     svc_qname = axis2_svc_get_qname(svc, env);
-    svc_name = axutil_qname_to_string((axutil_qname_t *) svc_qname, env);
+    svc_name = axutil_qname_to_string((axutil_qname_t *)svc_qname, env);
     axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, svc);
 
     status = axis2_svc_set_last_update(svc, env);
 
-    if (AXIS2_SUCCESS != status)
+    if(AXIS2_SUCCESS != status)
     {
         /* remove the previously added service */
         axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Setting last update failed for service %s", 
-                svc_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Setting last update failed for service %s",
+            svc_name);
 
         return status;
     }
 
     status = axis2_svc_set_parent(svc, env, svc_grp);
-    if (AXIS2_SUCCESS != status)
+    if(AXIS2_SUCCESS != status)
     {
         /* remove the previously added service */
         axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
@@ -268,9 +263,8 @@
 
     AXIS2_PARAM_CHECK(env->error, qname, NULL);
 
-    name = axutil_qname_to_string((axutil_qname_t *) qname, env);
-    return (axis2_svc_t *) axutil_hash_get(svc_grp->svcs, name,
-                                           AXIS2_HASH_KEY_STRING);
+    name = axutil_qname_to_string((axutil_qname_t *)qname, env);
+    return (axis2_svc_t *)axutil_hash_get(svc_grp->svcs, name, AXIS2_HASH_KEY_STRING);
 }
 
 AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
@@ -294,7 +288,7 @@
 
     svc = axis2_svc_grp_get_svc(svc_grp, env, svc_qname);
 
-    svc_name = axutil_qname_to_string((axutil_qname_t *) svc_qname, env);
+    svc_name = axutil_qname_to_string((axutil_qname_t *)svc_qname, env);
     axutil_hash_set(svc_grp->svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
 
     return AXIS2_SUCCESS;
@@ -309,18 +303,14 @@
     const axis2_char_t *svc_grp_name = axis2_svc_grp_get_name(svc_grp, env);
     axis2_char_t *param_name = axutil_param_get_name(param, env);
     AXIS2_PARAM_CHECK(env->error, param, AXIS2_FAILURE);
-    if (axis2_svc_grp_is_param_locked(svc_grp, env, param_name))
+    if(axis2_svc_grp_is_param_locked(svc_grp, env, param_name))
     {
-        AXIS2_ERROR_SET(env->error,
-                        AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Parameter %s is locked for service group %s", param_name, 
-            svc_grp_name);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Parameter %s is locked for service group %s",
+            param_name, svc_grp_name);
         return AXIS2_FAILURE;
     }
-    return axutil_param_container_add_param(svc_grp->param_container, env,
-                                            param);
+    return axutil_param_container_add_param(svc_grp->param_container, env, param);
 }
 
 AXIS2_EXTERN axutil_param_t *AXIS2_CALL
@@ -332,9 +322,8 @@
     axutil_param_t *param = NULL;
     AXIS2_PARAM_CHECK(env->error, name, NULL);
 
-    param =
-        axutil_param_container_get_param(svc_grp->param_container, env, name);
-    if (!param && svc_grp->parent)
+    param = axutil_param_container_get_param(svc_grp->param_container, env, name);
+    if(!param && svc_grp->parent)
     {
         param = axis2_conf_get_param(svc_grp->parent, env, name);
     }
@@ -364,16 +353,16 @@
 
     parent = axis2_svc_grp_get_parent(svc_grp, env);
     /* Checking the locked value of parent */
-    if (parent)
+    if(parent)
     {
         locked = axis2_conf_is_param_locked(parent, env, param_name);
     }
-    if (locked)
+    if(locked)
     {
         ret = AXIS2_TRUE;
     }
     param = axis2_svc_grp_get_param(svc_grp, env, param_name);
-    if (param && axutil_param_is_locked(param, env))
+    if(param && axutil_param_is_locked(param, env))
     {
         ret = AXIS2_TRUE;
     }
@@ -409,13 +398,12 @@
 {
     AXIS2_PARAM_CHECK(env->error, parent, AXIS2_FAILURE);
 
-    if (svc_grp->parent)
+    if(svc_grp->parent)
         axis2_conf_free(svc_grp->parent, env);
     svc_grp->parent = parent;
-    if (parent)
+    if(parent)
     {
-        axis2_desc_set_parent(svc_grp->base, env,
-                              axis2_conf_get_base(parent, env));
+        axis2_desc_set_parent(svc_grp->base, env, axis2_conf_get_base(parent, env));
     }
     return AXIS2_SUCCESS;
 }
@@ -441,66 +429,67 @@
     AXIS2_PARAM_CHECK(env->error, module_name, AXIS2_FAILURE);
 
     size = axutil_array_list_size(svc_grp->module_qname_list, env);
-    for (i = 0; size; i++)
+    for(i = 0; size; i++)
     {
         modu = axutil_array_list_get(svc_grp->module_qname_list, env, i);
         modu_local = axutil_qname_get_localpart(modu, env);
         module_name_local = axutil_qname_get_localpart(module_name, env);
-        if (!axutil_strcmp(modu_local, module_name_local))
+        if(!axutil_strcmp(modu_local, module_name_local))
         {
-            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_ALREADY_ENGAGED_TO_SVC_GRP, AXIS2_FAILURE);
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                    "Module %s is already engaged to service group %s", module_name_local, 
-                    svc_grp_name);
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_ALREADY_ENGAGED_TO_SVC_GRP,
+                AXIS2_FAILURE);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "Module %s is already engaged to service group %s", module_name_local, svc_grp_name);
 
             return AXIS2_FAILURE;
         }
     }
 
     svc_map = axis2_svc_grp_get_all_svcs(svc_grp, env);
-    if (!svc_map)
+    if(!svc_map)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service map not found for service group %s", 
-                svc_grp_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service map not found for service group %s",
+            svc_grp_name);
 
         return AXIS2_FAILURE;
     }
 
     phase_resolver = axis2_phase_resolver_create_with_config(env, svc_grp->parent);
 
-    if (!phase_resolver)
+    if(!phase_resolver)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
             "Creating phase resolver failed for service group %s", svc_grp_name);
 
         return AXIS2_FAILURE;
     }
 
     module = axis2_conf_get_module(svc_grp->parent, env, module_name);
-    if (module)
+    if(module)
     {
         axis2_svc_t *axis_svc = NULL;
         axutil_hash_index_t *index = NULL;
 
         index = axutil_hash_first(svc_map, env);
-        while (index)
+        while(index)
         {
             const axis2_char_t *svc_name = NULL;
             void *v = NULL;
             /* engage in per each service */
             axutil_hash_this(index, NULL, NULL, &v);
-            axis_svc = (axis2_svc_t *) v;
+            axis_svc = (axis2_svc_t *)v;
             svc_name = axis2_svc_get_name(axis_svc, env);
-            status = axis2_phase_resolver_engage_module_to_svc(phase_resolver, env, axis_svc, module);
+            status = axis2_phase_resolver_engage_module_to_svc(phase_resolver, env, axis_svc,
+                module);
 
-            if (!status)
+            if(!status)
             {
-                if (phase_resolver)
+                if(phase_resolver)
                 {
                     axis2_phase_resolver_free(phase_resolver, env);
                 }
 
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Engaging module %s to service %s failed", 
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Engaging module %s to service %s failed",
                     module_name_local, svc_name);
 
                 return status;
@@ -510,7 +499,7 @@
         }
     }
 
-    if (phase_resolver)
+    if(phase_resolver)
     {
         axis2_phase_resolver_free(phase_resolver, env);
     }
@@ -537,13 +526,13 @@
     AXIS2_PARAM_CHECK(env->error, moduleref, AXIS2_FAILURE);
     svc_grp_name = axis2_svc_grp_get_name(svc_grp, env);
 
-    if (!svc_grp->module_list)
+    if(!svc_grp->module_list)
     {
         svc_grp->module_list = axutil_array_list_create(env, 0);
-        if (!svc_grp->module_list)
+        if(!svc_grp->module_list)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating module list failed for service group %s", 
-                svc_grp_name);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "Creating module list failed for service group %s", svc_grp_name);
             return AXIS2_FAILURE;
         }
     }
@@ -571,11 +560,11 @@
     AXIS2_PARAM_CHECK(env->error, parent, NULL);
     svc_grp_name = axis2_svc_grp_get_name(svc_grp, env);
 
-    svc_grp_ctx = axis2_svc_grp_ctx_create(env, (axis2_svc_grp_t *) svc_grp, parent);
-    if (!svc_grp_ctx)
+    svc_grp_ctx = axis2_svc_grp_ctx_create(env, (axis2_svc_grp_t *)svc_grp, parent);
+    if(!svc_grp_ctx)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Creating service group context failed for service group %s", svc_grp_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+            "Creating service group context failed for service group %s", svc_grp_name);
         return NULL;
     }
 

Modified: webservices/axis2/trunk/c/src/core/description/transport_in_desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/transport_in_desc.c?rev=805347&r1=805346&r2=805347&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/transport_in_desc.c (original)
+++ webservices/axis2/trunk/c/src/core/description/transport_in_desc.c Tue Aug 18 10:15:49 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -44,11 +43,10 @@
 {
     axis2_transport_in_desc_t *transport_in = NULL;
 
-    transport_in = (axis2_transport_in_desc_t *) AXIS2_MALLOC(env->allocator,
-                                                              sizeof
-                                                              (axis2_transport_in_desc_t));
+    transport_in = (axis2_transport_in_desc_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axis2_transport_in_desc_t));
 
-    if (!transport_in)
+    if(!transport_in)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -63,7 +61,7 @@
     transport_in->param_container = NULL;
 
     transport_in->param_container = axutil_param_container_create(env);
-    if (!transport_in->param_container)
+    if(!transport_in->param_container)
     {
         axis2_transport_in_desc_free(transport_in, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -78,32 +76,32 @@
     axis2_transport_in_desc_t * transport_in,
     const axutil_env_t * env)
 {
-    if (transport_in->recv)
+    if(transport_in->recv)
     {
         axis2_transport_receiver_free(transport_in->recv, env);
     }
 
-    if (transport_in->param_container)
+    if(transport_in->param_container)
     {
         axutil_param_container_free(transport_in->param_container, env);
     }
 
-    if (transport_in->in_flow)
+    if(transport_in->in_flow)
     {
         axis2_flow_free(transport_in->in_flow, env);
     }
 
-    if (transport_in->fault_in_flow)
+    if(transport_in->fault_in_flow)
     {
         axis2_flow_free(transport_in->fault_in_flow, env);
     }
 
-    if (transport_in->in_phase)
+    if(transport_in->in_phase)
     {
         axis2_phase_free(transport_in->in_phase, env);
     }
 
-    if (transport_in->fault_phase)
+    if(transport_in->fault_phase)
     {
         axis2_phase_free(transport_in->fault_phase, env);
     }
@@ -120,7 +118,7 @@
 {
     axis2_transport_in_desc_t *transport_in_l = NULL;
 
-    transport_in_l = (axis2_transport_in_desc_t *) transport_in;
+    transport_in_l = (axis2_transport_in_desc_t *)transport_in;
     axis2_transport_in_desc_free(transport_in_l, env);
     return;
 }
@@ -159,7 +157,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, in_flow, AXIS2_FAILURE);
 
-    if (transport_in->in_flow)
+    if(transport_in->in_flow)
     {
         axis2_flow_free(transport_in->in_flow, env);
     }
@@ -183,7 +181,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, fault_in_flow, AXIS2_FAILURE);
 
-    if (transport_in->fault_in_flow)
+    if(transport_in->fault_in_flow)
     {
         axis2_flow_free(transport_in->fault_in_flow, env);
     }
@@ -207,7 +205,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, recv, AXIS2_FAILURE);
 
-    if (transport_in->recv)
+    if(transport_in->recv)
     {
         axis2_transport_receiver_free(transport_in->recv, env);
     }
@@ -232,7 +230,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, in_phase, AXIS2_FAILURE);
 
-    if (transport_in->in_phase)
+    if(transport_in->in_phase)
     {
         axis2_phase_free(transport_in->in_phase, env);
     }
@@ -256,7 +254,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, fault_phase, AXIS2_FAILURE);
 
-    if (transport_in->fault_phase)
+    if(transport_in->fault_phase)
     {
         axis2_phase_free(transport_in->fault_phase, env);
     }
@@ -273,8 +271,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, param, AXIS2_FAILURE);
 
-    return axutil_param_container_add_param(transport_in_desc->
-                                            param_container, env, param);
+    return axutil_param_container_add_param(transport_in_desc-> param_container, env, param);
 }
 
 axutil_param_t *AXIS2_CALL
@@ -283,8 +280,7 @@
     const axutil_env_t * env,
     const axis2_char_t * param_name)
 {
-    return axutil_param_container_get_param(transport_in_desc->param_container,
-                                            env, param_name);
+    return axutil_param_container_get_param(transport_in_desc->param_container, env, param_name);
 }
 
 axis2_bool_t AXIS2_CALL
@@ -295,9 +291,8 @@
 {
     AXIS2_PARAM_CHECK(env->error, param_name, AXIS2_FAILURE);
 
-    return axutil_param_container_is_param_locked(transport_in_desc->
-                                                  param_container, env,
-                                                  param_name);
+    return axutil_param_container_is_param_locked(transport_in_desc-> param_container, env,
+        param_name);
 }
 
 AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/src/core/description/transport_out_desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/transport_out_desc.c?rev=805347&r1=805346&r2=805347&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/transport_out_desc.c (original)
+++ webservices/axis2/trunk/c/src/core/description/transport_out_desc.c Tue Aug 18 10:15:49 2009
@@ -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,12 +37,10 @@
 {
     axis2_transport_out_desc_t *transport_out = NULL;
 
-    transport_out = (axis2_transport_out_desc_t *) AXIS2_MALLOC(env->
-                                                                allocator,
-                                                                sizeof
-                                                                (axis2_transport_out_desc_t));
+    transport_out = (axis2_transport_out_desc_t *)AXIS2_MALLOC(env-> allocator,
+        sizeof(axis2_transport_out_desc_t));
 
-    if (!transport_out)
+    if(!transport_out)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -58,7 +55,7 @@
     transport_out->param_container = NULL;
 
     transport_out->param_container = axutil_param_container_create(env);
-    if (!transport_out->param_container)
+    if(!transport_out->param_container)
     {
         axis2_transport_out_desc_free(transport_out, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -73,32 +70,32 @@
     axis2_transport_out_desc_t * transport_out,
     const axutil_env_t * env)
 {
-    if (transport_out->sender)
+    if(transport_out->sender)
     {
         AXIS2_TRANSPORT_SENDER_FREE(transport_out->sender, env);
     }
 
-    if (transport_out->param_container)
+    if(transport_out->param_container)
     {
         axutil_param_container_free(transport_out->param_container, env);
     }
 
-    if (transport_out->out_flow)
+    if(transport_out->out_flow)
     {
         axis2_flow_free(transport_out->out_flow, env);
     }
 
-    if (transport_out->fault_out_flow)
+    if(transport_out->fault_out_flow)
     {
         axis2_flow_free(transport_out->fault_out_flow, env);
     }
 
-    if (transport_out->out_phase)
+    if(transport_out->out_phase)
     {
         axis2_phase_free(transport_out->out_phase, env);
     }
 
-    if (transport_out->fault_phase)
+    if(transport_out->fault_phase)
     {
         axis2_phase_free(transport_out->fault_phase, env);
     }
@@ -115,7 +112,7 @@
 {
     axis2_transport_out_desc_t *transport_out_l = NULL;
 
-    transport_out_l = (axis2_transport_out_desc_t *) transport_out;
+    transport_out_l = (axis2_transport_out_desc_t *)transport_out;
     axis2_transport_out_desc_free(transport_out_l, env);
     return;
 }
@@ -154,7 +151,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, out_flow, AXIS2_FAILURE);
 
-    if (transport_out->out_flow)
+    if(transport_out->out_flow)
     {
         axis2_flow_free(transport_out->out_flow, env);
     }
@@ -178,7 +175,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, fault_out_flow, AXIS2_FAILURE);
 
-    if (transport_out->fault_out_flow)
+    if(transport_out->fault_out_flow)
     {
         axis2_flow_free(transport_out->fault_out_flow, env);
     }
@@ -202,7 +199,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, sender, AXIS2_FAILURE);
 
-    if (transport_out->sender)
+    if(transport_out->sender)
     {
         AXIS2_TRANSPORT_SENDER_FREE(transport_out->sender, env);
     }
@@ -227,7 +224,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, out_phase, AXIS2_FAILURE);
 
-    if (transport_out->out_phase)
+    if(transport_out->out_phase)
     {
         axis2_phase_free(transport_out->out_phase, env);
     }
@@ -251,7 +248,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, fault_phase, AXIS2_FAILURE);
 
-    if (transport_out->fault_phase)
+    if(transport_out->fault_phase)
     {
         axis2_phase_free(transport_out->fault_phase, env);
     }
@@ -268,8 +265,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, param, AXIS2_FAILURE);
 
-    return axutil_param_container_add_param(transport_out_desc->
-                                            param_container, env, param);
+    return axutil_param_container_add_param(transport_out_desc-> param_container, env, param);
 }
 
 axutil_param_t *AXIS2_CALL
@@ -278,8 +274,7 @@
     const axutil_env_t * env,
     const axis2_char_t * param_name)
 {
-    return axutil_param_container_get_param(transport_out_desc->param_container,
-                                            env, param_name);
+    return axutil_param_container_get_param(transport_out_desc->param_container, env, param_name);
 }
 
 axis2_bool_t AXIS2_CALL
@@ -290,9 +285,8 @@
 {
     AXIS2_PARAM_CHECK(env->error, param_name, AXIS2_FAILURE);
 
-    return axutil_param_container_is_param_locked(transport_out_desc->
-                                                  param_container, env,
-                                                  param_name);
+    return axutil_param_container_is_param_locked(transport_out_desc-> param_container, env,
+        param_name);
 }
 
 AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/src/core/engine/addr_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/addr_disp.c?rev=805347&r1=805346&r2=805347&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/addr_disp.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/addr_disp.c Tue Aug 18 10:15:49 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -50,17 +49,15 @@
     axis2_handler_t *handler = NULL;
     axutil_string_t *name = NULL;
 
-    name =
-        axutil_string_create_const(env,
-                                   (axis2_char_t **) & AXIS2_ADDR_DISP_NAME);
-    if (!name)
+    name = axutil_string_create_const(env, (axis2_char_t **)&AXIS2_ADDR_DISP_NAME);
+    if(!name)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
     disp = axis2_disp_create(env, name);
-    if (!disp)
+    if(!disp)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         axutil_string_free(name, env);
@@ -68,10 +65,9 @@
     }
 
     handler = axis2_disp_get_base(disp, env);
-    if (!handler)
+    if(!handler)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_HANDLER_STATE,
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_HANDLER_STATE, AXIS2_FAILURE);
         axutil_string_free(name, env);
         return NULL;
     }
@@ -91,59 +87,57 @@
     axis2_endpoint_ref_t *endpoint_ref = NULL;
     axis2_svc_t *svc = NULL;
 
-    if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
+    if(axis2_msg_ctx_get_doing_rest(msg_ctx, env))
         return NULL;
 
     endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env);
 
-    if (endpoint_ref)
+    if(endpoint_ref)
     {
         const axis2_char_t *address = NULL;
 
         address = axis2_endpoint_ref_get_address(endpoint_ref, env);
-        if (address)
+        if(address)
         {
             axis2_char_t **url_tokens = NULL;
             AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                            "Checking for service using WSA enpoint address : %s",
-                            address);
+                "Checking for service using WSA enpoint address : %s", address);
 
-            if ((axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL, address) == 0) ||
-                (axutil_strcmp(AXIS2_WSA_NAMESPACE_SUBMISSION, address) == 0))
+            if((axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL, address) == 0) || (axutil_strcmp(
+                AXIS2_WSA_NAMESPACE_SUBMISSION, address) == 0))
             {
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "Endpoint address cannot be the same as WSA namespace : %s",
-                                address);
+                    "Endpoint address cannot be the same as WSA namespace : %s", address);
                 return NULL;
             }
 
             url_tokens = axutil_parse_request_url_for_svc_and_op(env, address);
 
-            if (url_tokens)
+            if(url_tokens)
             {
-                if (url_tokens[0])
+                if(url_tokens[0])
                 {
                     axis2_conf_ctx_t *conf_ctx = NULL;
 
                     conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
-                    if (conf_ctx)
+                    if(conf_ctx)
                     {
                         axis2_conf_t *conf = NULL;
                         conf = axis2_conf_ctx_get_conf(conf_ctx, env);
-                        if (conf)
+                        if(conf)
                         {
                             svc = axis2_conf_get_svc(conf, env, url_tokens[0]);
 
-                            if (svc)
+                            if(svc)
                             {
                                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                                                "Service found using WSA enpoint address");
+                                    "Service found using WSA enpoint address");
                             }
                         }
                     }
                     AXIS2_FREE(env->allocator, url_tokens[0]);
                 }
-                if (url_tokens[1])
+                if(url_tokens[1])
                 {
                     AXIS2_FREE(env->allocator, url_tokens[1]);
                 }
@@ -169,21 +163,20 @@
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, svc, NULL);
 
-    if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
+    if(axis2_msg_ctx_get_doing_rest(msg_ctx, env))
         return NULL;
 
     action = axis2_msg_ctx_get_wsa_action(msg_ctx, env);
 
-    if (action)
+    if(action)
     {
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                        "Checking for operation using WSA Action : %s", action);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Checking for operation using WSA Action : %s",
+            action);
 
         name = axutil_qname_create(env, action, NULL, NULL);
         op = axis2_svc_get_op_with_qname(svc, env, name);
-        if (op)
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                            "Operation found using WSA Action");
+        if(op)
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Operation found using WSA Action");
         axutil_qname_free(name, env);
     }
 
@@ -201,26 +194,25 @@
     relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
 
     /** first check if we can dispatch using the relates_to */
-    if (relates_to)
+    if(relates_to)
     {
         const axis2_char_t *relates_to_value = NULL;
         relates_to_value = axis2_relates_to_get_value(relates_to, env);
-        if (relates_to_value && axutil_strcmp(relates_to_value, "") != 0)
+        if(relates_to_value && axutil_strcmp(relates_to_value, "") != 0)
         {
             axis2_conf_ctx_t *conf_ctx = NULL;
 
             conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
-            if (conf_ctx)
+            if(conf_ctx)
             {
                 axis2_op_ctx_t *op_ctx = NULL;
-                const axis2_char_t *msg_id =
-                    axis2_msg_ctx_get_msg_id(msg_ctx, env);
+                const axis2_char_t *msg_id = axis2_msg_ctx_get_msg_id(msg_ctx, env);
                 op_ctx = axis2_conf_ctx_get_op_ctx(conf_ctx, env, msg_id);
-                if (op_ctx)
+                if(op_ctx)
                 {
                     axis2_op_t *op = NULL;
                     op = axis2_op_ctx_get_op(op_ctx, env);
-                    if (op)
+                    if(op)
                     {
                         axis2_svc_ctx_t *svc_ctx = NULL;
                         axis2_msg_ctx_set_op_ctx(msg_ctx, env, op_ctx);
@@ -228,26 +220,22 @@
                         axis2_op_register_op_ctx(op, env, msg_ctx, op_ctx);
 
                         svc_ctx = axis2_op_ctx_get_parent(op_ctx, env);
-                        if (svc_ctx)
+                        if(svc_ctx)
                         {
                             axis2_svc_t *svc = NULL;
                             axis2_svc_grp_ctx_t *svc_grp_ctx = NULL;
                             axis2_msg_ctx_set_svc_ctx(msg_ctx, env, svc_ctx);
                             svc = axis2_svc_ctx_get_svc(svc_ctx, env);
-                            if (svc)
+                            if(svc)
                             {
                                 axis2_msg_ctx_set_svc(msg_ctx, env, svc);
                             }
-                            svc_grp_ctx =
-                                axis2_svc_ctx_get_parent(svc_ctx, env);
-                            if (svc_grp_ctx)
+                            svc_grp_ctx = axis2_svc_ctx_get_parent(svc_ctx, env);
+                            if(svc_grp_ctx)
                             {
-                                axutil_string_t *svc_grp_ctx_id_str =
-                                    axutil_string_create(env,
-                                                         axis2_svc_grp_ctx_get_id
-                                                         (svc_grp_ctx, env));
-                                axis2_msg_ctx_set_svc_grp_ctx_id(msg_ctx, env,
-                                                                 svc_grp_ctx_id_str);
+                                axutil_string_t *svc_grp_ctx_id_str = axutil_string_create(env,
+                                    axis2_svc_grp_ctx_get_id(svc_grp_ctx, env));
+                                axis2_msg_ctx_set_svc_grp_ctx_id(msg_ctx, env, svc_grp_ctx_id_str);
                                 axutil_string_free(svc_grp_ctx_id_str, env);
                             }
                             return AXIS2_SUCCESS;