axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r672494 - in /webservices/axis2/trunk/c/src/core/deployment: axis2_repos_listener.h dep_engine.c repos_listener.c
Date Sat, 28 Jun 2008 11:20:02 GMT
Author: damitha
Date: Sat Jun 28 04:20:01 2008
New Revision: 672494

URL: http://svn.apache.org/viewvc?rev=672494&view=rev
Log:
Code formatting and comments

Modified:
    webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h
    webservices/axis2/trunk/c/src/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/src/core/deployment/repos_listener.c

Modified: webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h?rev=672494&r1=672493&r2=672494&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h (original)
+++ webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h Sat Jun 28 04:20:01
2008
@@ -56,8 +56,7 @@
         const axutil_env_t * env);
 
     /**
-     * this method ask serachWS to serch for the folder to caheck
-     * for updates
+     * 
      * @param repos_listener pointer to repos listener
      * @param env pointer to environment struct
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
@@ -69,8 +68,7 @@
         const axutil_env_t * env);
 
     /**
-     * this method ask serachWS to serch for the folder to caheck
-     * for updates
+     * 
      * @param repos_listener pointer to repos listener
      * @param env pointer to environment struct
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
@@ -81,7 +79,7 @@
         const axutil_env_t * env);
 
     /**
-     * call to update method of WSInfoList object
+     * 
      * @param repos_listener pointer to repos listener
      * @param env pointer to environment struct
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
@@ -92,10 +90,9 @@
         const axutil_env_t * env);
 
     /**
-     * First it call to initalize method of WSInfoList to initilizat that.
-     * then it call to checkModules to load all the module.jar s
-     * and then it call to update() method inorder to update the Deployment engine and
-     * engine regsitry
+     * 
+     * then it call to check_modules to load all the modules.
+     * and then it call to update() method inorder to update the deployment engine and engine.
      * @param repos_listener pointer to repos listener
      * @param env pointer to environment struct
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE

Modified: webservices/axis2/trunk/c/src/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/dep_engine.c?rev=672494&r1=672493&r2=672494&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/dep_engine.c Sat Jun 28 04:20:01 2008
@@ -214,14 +214,14 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    dep_engine = (axis2_dep_engine_t *)
-        axis2_dep_engine_create_with_repos_name_and_svr_xml_file(env,
-                                                                 repos_path,
-                                                                 AXIS2_SERVER_XML_FILE);
+    dep_engine = (axis2_dep_engine_t *) axis2_dep_engine_create_with_repos_name_and_svr_xml_file(env,

+            repos_path, AXIS2_SERVER_XML_FILE);
+
     if (!dep_engine)
     {
         return NULL;
     }
+
 	dep_engine->file_flag = AXIS2_FALSE;
 
     return dep_engine;
@@ -236,9 +236,7 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    dep_engine = (axis2_dep_engine_t *)
-        axis2_dep_engine_create_with_svr_xml_file(env,
-                                                  axis2_xml);
+    dep_engine = (axis2_dep_engine_t *) axis2_dep_engine_create_with_svr_xml_file(env, axis2_xml);
     if (!dep_engine)
     {
         return NULL;
@@ -264,10 +262,8 @@
     AXIS2_PARAM_CHECK(env->error, svr_xml_file, NULL);
     if (!axutil_strcmp("", repos_path))
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Repository path cannot be empty");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Repository path cannot be empty");
         return NULL;
     }
 
@@ -284,10 +280,8 @@
     if (AXIS2_SUCCESS != status)
     {
         axis2_dep_engine_free(dep_engine, env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPOSITORY_NOT_EXIST,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Repository path %s does not exist", repos_path);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPOSITORY_NOT_EXIST, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Repository path %s does not exist", repos_path);
         return NULL;
     }
 
@@ -316,10 +310,8 @@
     if (!dep_engine->conf_name)
     {
         axis2_dep_engine_free(dep_engine, env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Axis2 Configuration file name cannot be NULL");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Axis2 Configuration file name cannot
be NULL");
         return NULL;
     }
 	
@@ -329,8 +321,7 @@
         axis2_dep_engine_free(dep_engine, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
                         AXIS2_FAILURE);
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Axis2 Configuration file name not found");
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Axis2 Configuration file name not found");
         return NULL;
     }
 
@@ -361,20 +352,16 @@
     if (!dep_engine->conf_name)
     {
         axis2_dep_engine_free(dep_engine, env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Axis2 Configuration file name cannot be NULL");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Axis2 Configuration file name cannot
be NULL");
         return NULL;
     }
     status = axutil_file_handler_access(dep_engine->conf_name, AXIS2_F_OK);
     if (AXIS2_SUCCESS != status)
     {
         axis2_dep_engine_free(dep_engine, env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
-                        AXIS2_FAILURE);
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Axis2 Configuration file name not found");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND, AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Axis2 Configuration file name not found");
         return NULL;
     }
 
@@ -389,7 +376,9 @@
 {
     AXIS2_ENV_CHECK(env, void);
     if (!dep_engine)
+    {
         return;
+    }
 
     if (dep_engine->curr_file)
     {
@@ -426,10 +415,12 @@
         {
             axis2_arch_file_data_t *file_data = NULL;
 
-            file_data = (axis2_arch_file_data_t *)
-                axutil_array_list_get(dep_engine->ws_to_deploy, env, i);
+            file_data = (axis2_arch_file_data_t *) axutil_array_list_get(dep_engine->ws_to_deploy,

+                    env, i);
+
             axis2_arch_file_data_free(file_data, env);
         }
+
         axutil_array_list_free(dep_engine->ws_to_deploy, env);
         dep_engine->ws_to_deploy = NULL;
     }
@@ -444,10 +435,12 @@
         {
             axis2_desc_builder_t *desc_builder = NULL;
 
-            desc_builder = (axis2_desc_builder_t *)
-                axutil_array_list_get(dep_engine->desc_builders, env, i);
+            desc_builder = (axis2_desc_builder_t *) axutil_array_list_get(dep_engine->desc_builders,

+                    env, i);
+
             axis2_desc_builder_free(desc_builder, env);
         }
+
         axutil_array_list_free(dep_engine->desc_builders, env);
     }
 
@@ -461,10 +454,12 @@
         {
             axis2_module_builder_t *module_builder = NULL;
 
-            module_builder = (axis2_module_builder_t *)
-                axutil_array_list_get(dep_engine->module_builders, env, i);
+            module_builder = (axis2_module_builder_t *) axutil_array_list_get(
+                    dep_engine->module_builders, env, i);
+
             axis2_module_builder_free(module_builder, env);
         }
+
         axutil_array_list_free(dep_engine->module_builders, env);
     }
 
@@ -478,10 +473,12 @@
         {
             axis2_svc_builder_t *svc_builder = NULL;
 
-            svc_builder = (axis2_svc_builder_t *)
-                axutil_array_list_get(dep_engine->svc_builders, env, i);
+            svc_builder = (axis2_svc_builder_t *) axutil_array_list_get(dep_engine->svc_builders,

+                    env, i);
+
             axis2_svc_builder_free(svc_builder, env);
         }
+
         axutil_array_list_free(dep_engine->svc_builders, env);
     }
 
@@ -495,10 +492,12 @@
         {
             axis2_svc_grp_builder_t *svc_grp_builder = NULL;
 
-            svc_grp_builder = (axis2_svc_grp_builder_t *)
-                axutil_array_list_get(dep_engine->svc_grp_builders, env, i);
+            svc_grp_builder = (axis2_svc_grp_builder_t *) axutil_array_list_get(
+                    dep_engine->svc_grp_builders, env, i);
+
             axis2_svc_grp_builder_free(svc_grp_builder, env);
         }
+
         axutil_array_list_free(dep_engine->svc_grp_builders, env);
     }
 
@@ -513,13 +512,16 @@
         {
             axis2_arch_file_data_t *file_data = NULL;
 
-            file_data = (axis2_arch_file_data_t *)
-                axutil_array_list_get(dep_engine->ws_to_undeploy, env, i);
+            file_data = (axis2_arch_file_data_t *) axutil_array_list_get(dep_engine->ws_to_undeploy,

+                    env, i);
+
             axis2_arch_file_data_free(file_data, env);
         }
+
         axutil_array_list_free(dep_engine->ws_to_undeploy, env);
         dep_engine->ws_to_undeploy = NULL;
     }
+
     if (dep_engine->module_list)
     {
         int size = 0;
@@ -536,16 +538,20 @@
                 axutil_qname_free(qname, env);
             }
         }
+
         axutil_array_list_free(dep_engine->module_list, env);
     }
+
     if (dep_engine->folder_name)
     {
         AXIS2_FREE(env->allocator, dep_engine->folder_name);
     }
+
     if (dep_engine->conf_name)
     {
         AXIS2_FREE(env->allocator, dep_engine->conf_name);
     }
+
     if (dep_engine->axis2_repos)
     {
         AXIS2_FREE(env->allocator, dep_engine->axis2_repos);
@@ -703,10 +709,11 @@
 
     if (!dep_engine->conf_name)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_PATH_TO_CONFIG_CAN_NOT_BE_NULL,
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_PATH_TO_CONFIG_CAN_NOT_BE_NULL, AXIS2_FAILURE);
+
 		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
             "Path to axis2 configuration file is NULL. Unable to continue");
+
         return NULL;
     }
 
@@ -714,8 +721,7 @@
 
     if (!dep_engine->conf)
     {
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "No memory. Allocation to configuration failed");
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "No memory. Allocation to configuration failed");
         return NULL;
     }
 	
@@ -875,26 +881,27 @@
             }
             else
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI,
-                    "axis2.xml is not available in client repo %s ", client_home);
+                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
+                        "axis2.xml is not available in client repo %s ", client_home);
+
                 AXIS2_ERROR_SET (env->error, AXIS2_ERROR_CONFIG_NOT_FOUND, AXIS2_FAILURE);
+
                 return NULL;
             }
         }
         else
         {
-            dep_engine->conf_name =
-                axutil_strdup(env, AXIS2_CONFIGURATION_RESOURCE);
+            dep_engine->conf_name = axutil_strdup(env, AXIS2_CONFIGURATION_RESOURCE);
+
             if (!dep_engine->conf_name)
             {
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL, 
-                    AXIS2_FAILURE);
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                    "Axis2 Configuration file name cannot be NULL");
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL, AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Axis2 Configuration file name
cannot be NULL");
                 return NULL;
             }
         }
     }
+
     else
     {
         is_repos_exist = AXIS2_TRUE;
@@ -903,17 +910,13 @@
     dep_engine->conf = axis2_conf_create(env);
     if (!dep_engine->conf)
     {
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "No memory. Allocation for Axis2 Configuration failed");
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "No memory. Allocation for Axis2 Configuration
failed");
         return NULL;
     }
     dep_engine->conf_builder =
-        axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
-                                                                    dep_engine->
-                                                                    conf_name,
-                                                                    dep_engine,
-                                                                    dep_engine->
-                                                                    conf);
+        axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env, dep_engine->conf_name,

+                dep_engine, dep_engine->conf);
+
     if (!(dep_engine->conf_builder))
     {
         axis2_conf_free(dep_engine->conf, env);
@@ -933,8 +936,7 @@
     {
         axis2_conf_free(dep_engine->conf, env);
         dep_engine->conf = NULL;
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Populating Axis2 Configuration failed");
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Populating Axis2 Configuration failed");
         return NULL;
     }
 
@@ -943,8 +945,7 @@
     {
         axis2_conf_free(dep_engine->conf, env);
         dep_engine->conf = NULL;
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Setting service and module paths failed");
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Setting service and module paths failed");
         return NULL;
     }
 
@@ -957,31 +958,27 @@
         {
             axis2_repos_listener_free(dep_engine->repos_listener, env);
         }
-        dep_engine->repos_listener =
-            axis2_repos_listener_create_with_folder_name_and_dep_engine(
-                env,
-                dep_engine->folder_name,
-                dep_engine);
+
+        dep_engine->repos_listener = axis2_repos_listener_create_with_folder_name_and_dep_engine(env,
+                dep_engine->folder_name, dep_engine);
     }
 
     axis2_conf_set_repo(dep_engine->conf, env, dep_engine->axis2_repos);
-    axis2_core_utils_calculate_default_module_version(env,
-                                                      axis2_conf_get_all_modules
-                                                      (dep_engine->conf, env),
-                                                      dep_engine->conf);
+    axis2_core_utils_calculate_default_module_version(env, axis2_conf_get_all_modules(
+                dep_engine->conf, env), dep_engine->conf);
+
     axis2_conf_set_phases_info(dep_engine->conf, env, dep_engine->phases_info);
     status = axis2_dep_engine_engage_modules(dep_engine, env);
-    if (AXIS2_FAILURE == status)
+    if (AXIS2_SUCCESS != status)
     {
         axis2_repos_listener_free(dep_engine->repos_listener, env);
         axis2_conf_free(dep_engine->conf, env);
         dep_engine->conf = NULL;
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
-                        AXIS2_FAILURE);
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Module engage failed for deployment engine");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED, AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Module engage failed for deployment engine");
         return NULL;
     }
+
     return dep_engine->conf;
 }
 
@@ -1011,10 +1008,8 @@
             axutil_strdup(env, AXIS2_CONFIGURATION_RESOURCE);
         if (!dep_engine->conf_name)
         {
-            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
-                            AXIS2_FAILURE);
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Axis2 Configuration file name cannot be NULL");
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND, AXIS2_FAILURE);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Axis2 Configuration file name cannot
be NULL");
             return AXIS2_FAILURE;
         }
     }
@@ -1022,10 +1017,8 @@
     status = axutil_file_handler_access(dep_engine->conf_name, AXIS2_F_OK);
     if (AXIS2_SUCCESS != status)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
-                        AXIS2_FAILURE);
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Axis2 Configuration file name not found");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND, AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Axis2 Configuration file name not found");
         return AXIS2_FAILURE;
     }
 
@@ -1046,29 +1039,30 @@
     if (!dep_engine->module_list)
     {
         /* There are no modules */
-		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, 
-            "No modules configured");
+		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "No modules configured");
         return AXIS2_SUCCESS;
     }
+
     size = axutil_array_list_size(dep_engine->module_list, env);
 
     for (i = 0; i < size; i++)
     {
         axutil_qname_t *qname = NULL;
-        qname = (axutil_qname_t *)
-            axutil_array_list_get(dep_engine->module_list, env, i);
+        qname = (axutil_qname_t *) axutil_array_list_get(dep_engine->module_list, env,
i);
         if (qname && dep_engine->conf)
         {
             status = axis2_conf_engage_module(dep_engine->conf, env, qname);
             if (AXIS2_SUCCESS != status)
             {
-		        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                    "Engaging module %s to Axis2 Configuration failed", 
-                    axutil_qname_get_localpart(qname, env));
+                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
+                        "Engaging module %s to Axis2 Configuration failed",
+                        axutil_qname_get_localpart(qname, env));
+
                 return status;
             }
         }
     }
+
     return AXIS2_SUCCESS;
 }
 
@@ -1160,21 +1154,16 @@
             axis2_module_desc_t *module_desc = NULL;
             axutil_qname_t *qmodulename = NULL;
 
-            qmodulename = (axutil_qname_t *) axutil_array_list_get(grp_modules,
-                                                                   env, j);
-            module_desc = axis2_conf_get_module(dep_engine->conf, env,
-                                                qmodulename);
+            qmodulename = (axutil_qname_t *) axutil_array_list_get(grp_modules, env, j);
+            module_desc = axis2_conf_get_module(dep_engine->conf, env, qmodulename);
             if (module_desc)
             {
-                axis2_svc_engage_module(svc, env, module_desc,
-                                        dep_engine->conf);
+                axis2_svc_engage_module(svc, env, module_desc, dep_engine->conf);
             }
             else
             {
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "Invalid module reference taken from conf");
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODUELE_REF,
-                                AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid module reference taken
from conf");
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODUELE_REF, AXIS2_FAILURE);
                 return AXIS2_FAILURE;
             }
         }
@@ -1187,16 +1176,12 @@
             axis2_module_desc_t *module_desc = NULL;
             axutil_qname_t *qmodulename = NULL;
 
-            qmodulename = (axutil_qname_t *) axutil_array_list_get(list,
-                                                                   env, j);
-            module_desc = axis2_conf_get_module(dep_engine->conf, env,
-                                                qmodulename);
+            qmodulename = (axutil_qname_t *) axutil_array_list_get(list, env, j);
+            module_desc = axis2_conf_get_module(dep_engine->conf, env, qmodulename);
             if (module_desc)
             {
                 axis2_status_t status = AXIS2_FAILURE;
-                status =
-                    axis2_svc_engage_module(svc, env, module_desc,
-                                            dep_engine->conf);
+                status = axis2_svc_engage_module(svc, env, module_desc, dep_engine->conf);
                 if (!status)
                 {
 		            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
@@ -1207,10 +1192,8 @@
             }
             else
             {
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "Invalid module reference taken from conf");
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODUELE_REF,
-                                AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invalid module reference taken
from conf");
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODUELE_REF, AXIS2_FAILURE);
                 return AXIS2_FAILURE;
             }
         }
@@ -1237,8 +1220,7 @@
                 axutil_qname_t *module_qname = NULL;
                 axis2_module_desc_t *module = NULL;
 
-                module_qname = (axutil_qname_t *) axutil_array_list_get(modules,
-                                                                        env, k);
+                module_qname = (axutil_qname_t *) axutil_array_list_get(modules, env, k);
                 module = axis2_conf_get_module(dep_engine->conf, env, module_qname);
 
                 if (module)
@@ -1304,10 +1286,12 @@
     if (AXIS2_SUCCESS != status)
     {
         axutil_dll_desc_free(dll_desc, env);
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Setting dll path %s to the dll description failed", dll_path);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Setting dll path %s to the dll description
failed", 
+                dll_path);
+
         return AXIS2_FAILURE;
     }
+
     /* Free all temp vars */
     AXIS2_FREE(env->allocator, temp_path);
     temp_path = NULL;
@@ -1382,16 +1366,13 @@
     AXIS2_PARAM_CHECK (env->error, dep_engine, NULL);
 
     dll_desc = axutil_dll_desc_create(env);
-    dll_name =
-        axutil_dll_desc_create_platform_specific_dll_name(dll_desc, env,
-                                                          class_name);
+    dll_name = axutil_dll_desc_create_platform_specific_dll_name(dll_desc, env, class_name);
     axutil_dll_desc_set_name(dll_desc, env, dll_name);
     axutil_dll_desc_set_type(dll_desc, env, AXIS2_HANDLER_DLL);
     axutil_class_loader_init(env);
     impl_info_param = axutil_param_create(env, NULL, NULL);
     axutil_param_set_value(impl_info_param, env, dll_desc);
-    handler = (axis2_handler_t *) axutil_class_loader_create_dll(env,
-                                                                 impl_info_param);
+    handler = (axis2_handler_t *) axutil_class_loader_create_dll(env, impl_info_param);
 
     return handler;
 }
@@ -1508,8 +1489,8 @@
             axis2_char_t *file_name = NULL;
             axis2_module_desc_t *meta_data = NULL;
 
-            dep_engine->curr_file = (axis2_arch_file_data_t *)
-                axutil_array_list_get(dep_engine->ws_to_deploy, env, i);
+            dep_engine->curr_file = (axis2_arch_file_data_t *) axutil_array_list_get(
+                    dep_engine->ws_to_deploy, env, i);
 
             type = axis2_arch_file_data_get_type(dep_engine->curr_file, env);
             switch (type)
@@ -1524,20 +1505,19 @@
 
                     dep_engine->arch_reader = axis2_arch_reader_create (env);
                     svc_grp = axis2_svc_grp_create_with_conf(env, dep_engine->conf);
-                    file_name = axis2_arch_file_data_get_name(dep_engine->
-                                                              curr_file, env);
-                    status = axis2_arch_reader_process_svc_grp(dep_engine->arch_reader,
env,
-                                                               file_name,
-                                                               dep_engine, svc_grp);
+                    file_name = axis2_arch_file_data_get_name(dep_engine->curr_file, env);
+                    status = axis2_arch_reader_process_svc_grp(dep_engine->arch_reader,
env, 
+                            file_name, dep_engine, svc_grp);
+
                     if (AXIS2_SUCCESS != status)
                     {
                         axis2_arch_reader_free(dep_engine->arch_reader, env);
                         dep_engine->arch_reader = NULL;
                         dep_engine->curr_file = NULL;
-                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC,
-                                        AXIS2_FAILURE);
-		                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                            "Processing service group %s failed", file_name);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC, AXIS2_FAILURE);
+		                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Processing service group %s
failed", 
+                                file_name);
+
                         return status;
                     }
 
@@ -1547,16 +1527,17 @@
                         axis2_arch_reader_free(dep_engine->arch_reader, env);
                         dep_engine->arch_reader = NULL;
                         dep_engine->curr_file = NULL;
-                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC,
-                                        AXIS2_FAILURE);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC, AXIS2_FAILURE);
 		                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                            "Adding new service %s to the deployment engine "\
-                            "failed", file_name);
+                            "Adding new service %s to the deployment engine failed", file_name);
+
                         return status;
                     }
+
                     dep_engine->curr_file = NULL;
                     break;
                 }
+
                 case AXIS2_MODULE:
                 {
                     if (dep_engine->arch_reader)
@@ -1566,45 +1547,45 @@
                     }
                     dep_engine->arch_reader = axis2_arch_reader_create(env);
                     meta_data = axis2_module_desc_create(env);
-                    file_name = axis2_arch_file_data_get_name(dep_engine->
-                                                              curr_file, env);
-                    status =
-                        axis2_arch_reader_read_module_arch(env, file_name,
-                                                           dep_engine, meta_data);
+                    file_name = axis2_arch_file_data_get_name(dep_engine->curr_file, env);
+                    status = axis2_arch_reader_read_module_arch(env, file_name, dep_engine,
meta_data);
                     if (AXIS2_SUCCESS != status)
                     {
                         axis2_arch_reader_free (dep_engine->arch_reader, env);
                         dep_engine->arch_reader = NULL;
                         dep_engine->curr_file = NULL;
-                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE,
-                                        AXIS2_FAILURE);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE, AXIS2_FAILURE);
 		                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                            "Reading module archive for file %s failed", file_name);
+                                "Reading module archive for file %s failed", file_name);
+
                         return AXIS2_FAILURE;
                     }
-                    status = axis2_dep_engine_add_new_module(dep_engine, env,
-                                                             meta_data);
+
+                    status = axis2_dep_engine_add_new_module(dep_engine, env, meta_data);
                     if (AXIS2_SUCCESS != status)
                     {
                         axis2_arch_reader_free (dep_engine->arch_reader, env);
                         dep_engine->arch_reader = NULL;
                         dep_engine->curr_file = NULL;
-                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE,
-                                        AXIS2_FAILURE);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE, AXIS2_FAILURE);
+
 		                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                            "Adding new module %s to the deployment engine failed", 
-                                file_name);
+                            "Adding new module %s to the deployment engine failed", file_name);
+
                         return AXIS2_FAILURE;
                     }
+
                     dep_engine->curr_file = NULL;
                     break;
                 }
             };
+
             axis2_arch_reader_free (dep_engine->arch_reader, env);
             dep_engine->arch_reader = NULL;
             dep_engine->curr_file = NULL;
         }
     }
+
     return AXIS2_SUCCESS;
 }
 
@@ -1637,16 +1618,17 @@
                 axis2_char_t *file_name = NULL;
 
                 file_name = axis2_ws_info_get_file_name(ws_info, env);
-                svc_name = axis2_dep_engine_get_axis_svc_name(dep_engine, env,
-                                                              file_name);
+                svc_name = axis2_dep_engine_get_axis_svc_name(dep_engine, env, file_name);
 
                 axis2_conf_remove_svc(dep_engine->conf, env, svc_name);
             }
+
             faulty_svcs = axis2_conf_get_all_faulty_svcs(dep_engine->conf, env);
             axutil_hash_set(faulty_svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
         }
 
     }
+
     axutil_array_list_free(dep_engine->ws_to_undeploy, env);
 
     return AXIS2_SUCCESS;
@@ -1684,6 +1666,7 @@
     svc_name = AXIS2_MALLOC(env->allocator, len + 1);
     sscanf(temp_name, "%s", svc_name);
     AXIS2_FREE(env->allocator, file_name_l);
+
     return svc_name;
 }
 
@@ -1719,19 +1702,14 @@
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
     AXIS2_PARAM_CHECK (env->error, dep_engine, NULL);
 
-    dep_engine->curr_file = axis2_arch_file_data_create_with_type_and_name(env,
-                                                                           AXIS2_SVC,
-                                                                           "");
-
-    dep_engine->svc_builder =
-        axis2_svc_builder_create_with_file_and_dep_engine_and_svc(env,
-                                                                  file_name,
-                                                                  dep_engine,
-                                                                  svc);
-
-    node =
-        axis2_desc_builder_build_om(axis2_svc_builder_get_desc_builder
-                                    (dep_engine->svc_builder, env), env);
+    dep_engine->curr_file = axis2_arch_file_data_create_with_type_and_name(env, AXIS2_SVC,
"");
+
+    dep_engine->svc_builder = axis2_svc_builder_create_with_file_and_dep_engine_and_svc(env,

+            file_name, dep_engine, svc);
+
+    node = axis2_desc_builder_build_om(axis2_svc_builder_get_desc_builder(dep_engine->svc_builder,

+                env), env);
+
     axis2_svc_builder_populate_svc(dep_engine->svc_builder, env, node);
 
     return svc;
@@ -1765,29 +1743,25 @@
 
     phases_info = axis2_conf_get_phases_info(conf, env);
     axis2_dep_engine_set_phases_info(dep_engine, env, phases_info);
-    dep_engine->curr_file = 
-		axis2_arch_file_data_create_with_type_and_file(env,
-                                                       AXIS2_MODULE,
-                                                       module_archive);
+    dep_engine->curr_file = axis2_arch_file_data_create_with_type_and_file(env, AXIS2_MODULE,

+            module_archive);
+
     module_desc = axis2_module_desc_create(env);
     arch_reader = axis2_arch_reader_create(env);
     file_name = axutil_file_get_name(module_archive, env);
-    status = axis2_arch_reader_read_module_arch(env, file_name,
-                                                dep_engine, module_desc);
+    status = axis2_arch_reader_read_module_arch(env, file_name, dep_engine, module_desc);
     axis2_arch_reader_free(arch_reader, env);
     if (AXIS2_SUCCESS != status)
     {
         axis2_module_desc_free(module_desc, env);
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Reading module archive for file %s failed", file_name);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Reading module archive for file %s failed",
file_name);
         return NULL;
     }
     status = axis2_dep_engine_load_module_dll(dep_engine, env, module_desc);
     if (AXIS2_SUCCESS != status)
     {
         axis2_module_desc_free(module_desc, env);
-		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-            "Loading module dll %s failed", file_name);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Loading module dll %s failed", file_name);
         return NULL;
     }
 
@@ -1801,35 +1775,29 @@
     in_flow = axis2_module_desc_get_in_flow(module_desc, env);
     if (in_flow)
     {
-        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, in_flow,
-                                                  module->
-                                                  handler_create_func_map);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, in_flow, 
+                module->handler_create_func_map);
     }
 
     out_flow = axis2_module_desc_get_out_flow(module_desc, env);
     if (out_flow)
     {
-        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, out_flow,
-                                                  module->
-                                                  handler_create_func_map);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, out_flow, 
+                module->handler_create_func_map);
     }
 
     in_fault_flow = axis2_module_desc_get_fault_in_flow(module_desc, env);
     if (in_fault_flow)
     {
-        axis2_dep_engine_add_module_flow_handlers(dep_engine, env,
-                                                  in_fault_flow,
-                                                  module->
-                                                  handler_create_func_map);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, in_fault_flow, 
+                module->handler_create_func_map);
     }
 
     out_fault_flow = axis2_module_desc_get_fault_out_flow(module_desc, env);
     if (out_fault_flow)
     {
-        axis2_dep_engine_add_module_flow_handlers(dep_engine, env,
-                                                  out_fault_flow,
-                                                  module->
-                                                  handler_create_func_map);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, out_fault_flow, 
+                module->handler_create_func_map);
     }
 
     dep_engine->curr_file = NULL;
@@ -1888,8 +1856,7 @@
     AXIS2_PARAM_CHECK(env->error, module_builder, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
-    return axutil_array_list_add(dep_engine->module_builders, env,
-                                 module_builder);
+    return axutil_array_list_add(dep_engine->module_builders, env, module_builder);
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -1913,8 +1880,7 @@
     AXIS2_PARAM_CHECK(env->error, svc_grp_builder, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
-    return axutil_array_list_add(dep_engine->svc_grp_builders, env,
-                                 svc_grp_builder);
+    return axutil_array_list_add(dep_engine->svc_grp_builders, env, svc_grp_builder);
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -2002,8 +1968,7 @@
         conf = dep_engine->conf;
         if (!conf)
         {
-		    AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                "Axis2 Configuration cannot be NULL");
+		    AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "Axis2 Configuration cannot be NULL");
             return AXIS2_FAILURE;
         }
 
@@ -2030,6 +1995,7 @@
             }
         }
     }
+
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/src/core/deployment/repos_listener.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/repos_listener.c?rev=672494&r1=672493&r2=672494&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/repos_listener.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/repos_listener.c Sat Jun 28 04:20:01 2008
@@ -180,7 +180,7 @@
 
     conf = axis2_repos_listener_get_conf (repos_listener, env);
 
-    /* conf is needed only to decide we are using axis2.xml. Other
+    /* Configuration  is needed only to decide we are using axis2.xml. Other
      * case we don't need. Hence even if conf is NULL we can continue.
      */
 
@@ -192,8 +192,7 @@
     if (!axis2_flag)
     {
 
-        temp_path =
-            axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
+        temp_path = axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
         module_path = axutil_stracat(env, temp_path, AXIS2_MODULE_PATH);
         AXIS2_FREE(env->allocator, temp_path);
     }
@@ -207,16 +206,16 @@
         }
         else
         {
-            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                "While creating axis2 configuration using axis2.xml, modulesDir"\
-                " parameter not available.");
+            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "While creating axis2 configuration
using "\
+                    "axis2.xml, modulesDir  parameter not available.");
         }
 
     }
-    status =
-        axis2_repos_listener_search(repos_listener, env, module_path,
-                                    AXIS2_MODULE);
+
+    status = axis2_repos_listener_search(repos_listener, env, module_path, AXIS2_MODULE);
+
     AXIS2_FREE(env->allocator, module_path);
+
     return status;
 }
 



Mime
View raw message