axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r375589 - in /webservices/axis2/trunk/c: include/ modules/core/deployment/ modules/core/engine/ modules/mod_addr/ modules/util/
Date Tue, 07 Feb 2006 12:50:28 GMT
Author: damitha
Date: Tue Feb  7 04:49:37 2006
New Revision: 375589

URL: http://svn.apache.org/viewcvs?rev=375589&view=rev
Log:
Now it is not seg faulting. but still I could not
check whether logic is ok. ie. whether phases resolver
does it well

Modified:
    webservices/axis2/trunk/c/include/axis2_arch_reader.h
    webservices/axis2/trunk/c/include/axis2_conf.h
    webservices/axis2/trunk/c/include/axis2_dep_engine.h
    webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
    webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/modules/core/engine/conf.c
    webservices/axis2/trunk/c/modules/mod_addr/mod_addr.c
    webservices/axis2/trunk/c/modules/util/file.c

Modified: webservices/axis2/trunk/c/include/axis2_arch_reader.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_arch_reader.h?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_arch_reader.h (original)
+++ webservices/axis2/trunk/c/include/axis2_arch_reader.h Tue Feb  7 04:49:37 2006
@@ -106,6 +106,10 @@
                                         struct axis2_dep_engine *dep_engine,
                                         axis2_module_desc_t *module);
 
+axis2_file_t *(AXIS2_CALL *
+create_module_arch)(axis2_arch_reader_t *arch_reader,
+                    axis2_env_t **env,
+                    axis2_char_t *module_name);
 };
 
 /** 
@@ -142,6 +146,9 @@
 #define AXIS2_ARCH_READER_READ_MODULE_ARCH(arch_reader, env, file_path, dep_engine, module)
\
 		((arch_reader)->ops->read_module_arch (arch_reader, env, file_path, dep_engine, module))
 
+#define AXIS2_ARCH_READER_CREATE_MODULE_ARCH(arch_reader, env, module_name) \
+		((arch_reader)->ops->create_module_arch (arch_reader, env, module_name))
+        
 /*************************** End of function macros ***************************/
 
 /** @} */

Modified: webservices/axis2/trunk/c/include/axis2_conf.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_conf.h?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_conf.h (original)
+++ webservices/axis2/trunk/c/include/axis2_conf.h Tue Feb  7 04:49:37 2006
@@ -288,6 +288,10 @@
     set_dispatch_phase) (axis2_conf_t *conf,
                             axis2_env_t **env,
                             axis2_phase_t *dispatch);
+                            
+    axis2_char_t *(AXIS2_CALL *
+    get_repos) (axis2_conf_t *conf,
+                    axis2_env_t **env);
 
     axis2_status_t (AXIS2_CALL *
     set_repos) (axis2_conf_t *conf,
@@ -298,7 +302,8 @@
     engage_module) (axis2_conf_t *conf,
                             axis2_env_t **env,
                             axis2_qname_t *module_ref);
-                                                
+                            
+                   
 };
 
 /**
@@ -441,6 +446,9 @@
 #define AXIS2_CONF_SET_DISPATCH_PHASE(conf, env, dispatch) \
         ((conf)->ops->set_dispatch_phase(conf , env, dispatch)) 
 
+#define AXIS2_CONF_GET_REPOS(conf, env) \
+        ((conf)->ops->get_repos(conf , env))
+        
 #define AXIS2_CONF_SET_REPOS(conf, env, axis2_repos) \
         ((conf)->ops->set_repos(conf , env, axis2_repos))
         

Modified: webservices/axis2/trunk/c/include/axis2_dep_engine.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_dep_engine.h?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_dep_engine.h (original)
+++ webservices/axis2/trunk/c/include/axis2_dep_engine.h Tue Feb  7 04:49:37 2006
@@ -179,6 +179,11 @@
     axis2_char_t *(AXIS2_CALL *
     get_repos_path) (axis2_dep_engine_t *dep_engine,
                         axis2_env_t **env);
+                        
+    axis2_status_t (AXIS2_CALL *
+    set_current_file_item)(axis2_dep_engine_t *dep_engine,
+                            axis2_env_t **env,
+                            axis2_arch_file_data_t *file_data);                        
                                        
 };
     
@@ -220,7 +225,7 @@
     axis2_dep_engine_create_with_repos_name_and_svr_xml_file (
                                             axis2_env_t **env, 
                                             axis2_char_t *repos_path, 
-                                            axis2_char_t *svr_xml_file);
+                                            axis2_char_t *svr_xml_file);                
                           
 
 
 
@@ -281,6 +286,9 @@
 
 #define AXIS2_DEP_ENGINE_GET_REPOS_PATH(dep_engine, env) \
 		((dep_engine)->ops->get_repos_path (dep_engine, env))
+ 
+#define AXIS2_DEP_ENGINE_SET_CURRENT_FILE_ITEM(dep_engine, env, file_data) \
+		((dep_engine)->ops->set_current_file_item (dep_engine, env, file_data)) 
         
 /*************************** End of function macros ***************************/
 

Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Tue Feb  7 04:49:37 2006
@@ -66,7 +66,11 @@
                                     axis2_char_t *file_path,
                                     struct axis2_dep_engine *dep_engine,
                                     axis2_module_desc_t *module);
-                                
+axis2_file_t *AXIS2_CALL
+axis2_arch_reader_create_module_arch(axis2_arch_reader_t *arch_reader,
+                                        axis2_env_t **env,
+                                        axis2_char_t *module_name);
+                              
 /************************** End of function prototypes ************************/
 
 AXIS2_DECLARE(axis2_arch_reader_t *)
@@ -105,6 +109,8 @@
             axis2_arch_reader_build_svc_grp;
     arch_reader_impl->arch_reader.ops->read_module_arch = 
             axis2_arch_reader_read_module_arch;
+    arch_reader_impl->arch_reader.ops->create_module_arch = 
+            axis2_arch_reader_create_module_arch;
 	
 	return &(arch_reader_impl->arch_reader);
 }
@@ -497,4 +503,22 @@
         status = AXIS2_FAILURE;
     }
     return status;
+}
+
+axis2_file_t *AXIS2_CALL
+axis2_arch_reader_create_module_arch(axis2_arch_reader_t *arch_reader,
+                                        axis2_env_t **env,
+                                        axis2_char_t *module_name)
+{
+    axis2_file_t *file = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    
+    file = axis2_file_create(env);
+    if(!file)
+    {
+        return NULL;
+    }
+    AXIS2_FILE_SET_NAME(file, env, module_name);
+    return file;
 }

Modified: webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c Tue Feb  7 04:49:37 2006
@@ -253,7 +253,11 @@
     module_itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(conf_element, env,
         qmodulest, conf_node);
     AXIS2_QNAME_FREE(qmodulest, env);
-    axis2_conf_builder_process_module_refs(conf_builder, env, module_itr);
+    status = axis2_conf_builder_process_module_refs(conf_builder, env, module_itr);
+    if(AXIS2_SUCCESS != status)
+    {
+        return AXIS2_FAILURE;
+    }
     /* Proccessing Transport Sennders */
     qtransportsender = axis2_qname_create(env, AXIS2_TRANSPORTSENDER, NULL, NULL);
     trs_senders = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(conf_element, env,
@@ -296,8 +300,9 @@
                                 axis2_om_children_qname_iterator_t *module_refs) 
 {
     axis2_conf_builder_impl_t *builder_impl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
     
-    AXIS2_FUNC_PARAM_CHECK(conf_builder, env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, module_refs, AXIS2_FAILURE);
     builder_impl = AXIS2_INTF_TO_IMPL(conf_builder);
     
@@ -311,6 +316,10 @@
         axis2_om_attribute_t *module_ref_att = NULL;
         module_ref_node = (axis2_om_node_t *)
             AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(module_refs, env);
+        if(!module_ref_node)
+        {
+            return AXIS2_FAILURE;
+        }
         module_ref_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(module_ref_node, env);
         qref = axis2_qname_create(env, AXIS2_REF, NULL, NULL);
         module_ref_att = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(module_ref_element, env,
@@ -324,13 +333,13 @@
             
             ref_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(module_ref_att, env);
             qrefname = axis2_qname_create(env, ref_name, NULL, NULL);
-            AXIS2_DEP_ENGINE_ADD_MODULE(conf_builder->desc_builder->engine, env,
-                qrefname);
+            status = AXIS2_DEP_ENGINE_ADD_MODULE(conf_builder->desc_builder->
+                engine, env, qrefname);
             if (qrefname)
                 AXIS2_QNAME_FREE(qrefname, env);
         }
     }
-    return AXIS2_SUCCESS;
+    return status;
 }
 
 static axis2_status_t

Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Tue Feb  7 04:49:37 2006
@@ -95,6 +95,11 @@
 axis2_arch_file_data_t *AXIS2_CALL
 axis2_dep_engine_get_current_file_item(axis2_dep_engine_t *dep_engine,
                                         axis2_env_t **env);
+                                        
+axis2_status_t AXIS2_CALL
+axis2_dep_engine_set_current_file_item(axis2_dep_engine_t *dep_engine,
+                                        axis2_env_t **env,
+                                        axis2_arch_file_data_t *file_data);             
                          
 
 /**
  * @param file
@@ -351,6 +356,8 @@
     engine_impl->dep_engine.ops->build_svc = axis2_dep_engine_build_svc;
     engine_impl->dep_engine.ops->build_module = axis2_dep_engine_build_module;
     engine_impl->dep_engine.ops->get_repos_path = axis2_dep_engine_get_repos_path;
+    engine_impl->dep_engine.ops->set_current_file_item = 
+        axis2_dep_engine_set_current_file_item;
     
     return &(engine_impl->dep_engine);
 }
@@ -553,14 +560,14 @@
     axis2_qname_t *qname = NULL;
     axis2_dep_engine_impl_t *engine_impl = NULL;
     
-    AXIS2_FUNC_PARAM_CHECK(dep_engine, env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, module_qname, AXIS2_FAILURE);
     engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
     
     qname = AXIS2_QNAME_CLONE(module_qname, env);
     if(!engine_impl->module_list)
     {
-        engine_impl->module_list = axis2_array_list_create(env, 20);
+        engine_impl->module_list = axis2_array_list_create(env, 0);
         if(!engine_impl->module_list)
             return AXIS2_FAILURE;
     }
@@ -756,7 +763,14 @@
         return NULL;
     }
     
-    AXIS2_CONF_SET_PHASESINFO(engine_impl->conf, env, engine_impl->phases_info);
+    status = AXIS2_CONF_SET_PHASESINFO(engine_impl->conf, env, engine_impl->phases_info);
+    if(AXIS2_SUCCESS != status)
+    {
+        AXIS2_REPOS_LISTENER_FREE(repos_listener, env);
+        AXIS2_CONF_FREE(engine_impl->conf, env);
+        return NULL;
+    }
+    
     status = axis2_dep_engine_engage_modules(dep_engine, env);
     if(AXIS2_SUCCESS != status)
     {
@@ -910,8 +924,7 @@
     
     AXIS2_FUNC_PARAM_CHECK(dep_engine, env, AXIS2_FAILURE);
     engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
-    /* ArrayList modules = DeploymentData.getInstance().getModules(); */
-    /* PhaseResolver resolver = new PhaseResolver(axisConfig); */
+    
     if(!engine_impl->module_list)
     {
         /* there are no modules */
@@ -923,10 +936,12 @@
         axis2_qname_t *qname = (axis2_qname_t *) AXIS2_ARRAY_LIST_GET(
             engine_impl->module_list, env, i);
         if (qname && engine_impl->conf)
-            status = AXIS2_CONF_ENGAGE_MODULE(engine_impl->conf, env, qname);
-        if(AXIS2_SUCCESS != status)
         {
-            return AXIS2_FAILURE;
+            status = AXIS2_CONF_ENGAGE_MODULE(engine_impl->conf, env, qname);
+            if(AXIS2_SUCCESS != status)
+            {
+                return AXIS2_FAILURE;
+            }
         }
     }
     return AXIS2_SUCCESS;
@@ -1203,10 +1218,10 @@
     dll_path = NULL;
     
     AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_MODULE_DLL);
-    axis2_class_loader_init(env);
     impl_info_param = axis2_param_create(env, NULL, NULL);
     AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc);
     impl_info_param->ops->value_free = axis2_dll_desc_free_void_arg;
+    axis2_class_loader_init(env);
     module = (axis2_module_t *) axis2_class_loader_create_dll(env, 
         impl_info_param);
     
@@ -1339,9 +1354,6 @@
     {
         return status;
     }
-    AXIS2_CONF_ADD_MODULE(AXIS2_INTF_TO_IMPL(dep_engine)->conf, env, 
-        module_metadata);
-    /* log.info(Messages.getMessage(DeploymentErrorMsgs.ADDING_NEW_MODULE)); */
 
     in_flow = AXIS2_MODULE_DESC_GET_INFLOW(module_metadata, env);
     if(NULL != in_flow)
@@ -1371,6 +1383,10 @@
             module->handler_create_func_map);
     }
     
+    AXIS2_CONF_ADD_MODULE(AXIS2_INTF_TO_IMPL(dep_engine)->conf, env, 
+        module_metadata);
+    /* log.info(Messages.getMessage(DeploymentErrorMsgs.ADDING_NEW_MODULE)); */
+
     return AXIS2_SUCCESS;
 }
 
@@ -1616,8 +1632,9 @@
     axis2_flow_t *in_fault_flow = NULL;
     axis2_flow_t *out_fault_flow = NULL;
     axis2_char_t *file_name = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
     
-    AXIS2_FUNC_PARAM_CHECK(dep_engine, env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, module_archive, NULL);
     AXIS2_PARAM_CHECK((*env)->error, conf, NULL);
     engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
@@ -1629,10 +1646,22 @@
     module_desc = axis2_module_desc_create(env);
     arch_reader = axis2_arch_reader_create(env);
     file_name = AXIS2_FILE_GET_NAME(module_archive, env);
-    AXIS2_ARCH_READER_READ_MODULE_ARCH(arch_reader, env, file_name, dep_engine, 
-        module_desc);    
-
-    axis2_dep_engine_load_module_dll(dep_engine, env, module_desc);
+    status = AXIS2_ARCH_READER_READ_MODULE_ARCH(arch_reader, env, file_name, 
+        dep_engine, module_desc);    
+    if(AXIS2_SUCCESS != status)
+    {
+        AXIS2_MODULE_DESC_FREE(module_desc, env);
+        AXIS2_ARCH_READER_FREE(arch_reader, env);
+        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_ARCH_READER_FREE(arch_reader, env);
+        return NULL;
+    }
+    
     module = AXIS2_MODULE_DESC_GET_MODULE(module_desc, env);
     AXIS2_MODULE_FILL_HANDLER_CREATE_FUNC_MAP(module, env);
 
@@ -1675,6 +1704,25 @@
                                 axis2_env_t **env)
 {
     return AXIS2_INTF_TO_IMPL(dep_engine)->folder_name;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_dep_engine_set_current_file_item(axis2_dep_engine_t *dep_engine,
+                                        axis2_env_t **env,
+                                        axis2_arch_file_data_t *file_data)
+{
+    axis2_dep_engine_impl_t *engine_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
+    
+    if(engine_impl->curr_file)
+    {
+        AXIS2_ARCH_FILE_DATA_FREE(engine_impl->curr_file, env);
+        engine_impl->curr_file = NULL;
+    }
+    engine_impl->curr_file = file_data;
+    return AXIS2_SUCCESS;
 }
 /* public AxisService deployService(ClassLoader classLoder, InputStream serviceStream, String
servieName) throws DeploymentException {
 AxisService service = null;

Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/conf.c?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Tue Feb  7 04:49:37 2006
@@ -19,6 +19,7 @@
 #include <axis2_conf.h>
 #include <axis2_dir_handler.h>
 #include <axis2_dep_engine.h>
+#include <axis2_arch_reader.h>
 
 
 typedef struct axis2_conf_impl axis2_conf_impl_t;
@@ -267,16 +268,21 @@
                                 axis2_env_t **env,
                                 axis2_phase_t *dispatch);
 
-axis2_status_t AXIS2_CALL
-axis2_conf_set_repos(axis2_conf_t *conf,
-                        axis2_env_t **env,
-                        axis2_char_t *axis2_repos);                                
 
 axis2_status_t AXIS2_CALL
 axis2_conf_engage_module(axis2_conf_t *conf,
                         axis2_env_t **env,
                         axis2_qname_t *module_ref);
-                                
+
+axis2_char_t *AXIS2_CALL
+axis2_conf_get_repos(axis2_conf_t *conf,
+                     axis2_env_t **env);
+                            
+axis2_status_t AXIS2_CALL
+axis2_conf_set_repos(axis2_conf_t *conf,
+                        axis2_env_t **env,
+                        axis2_char_t *repos_path);
+
 /************************** End of function prototypes ************************/
 
 axis2_conf_t * AXIS2_CALL 
@@ -569,6 +575,7 @@
     config_impl->conf.ops->set_default_dispatchers = 
         axis2_conf_set_default_dispatchers;
     config_impl->conf.ops->set_dispatch_phase = axis2_conf_set_dispatch_phase;
+    config_impl->conf.ops->get_repos = axis2_conf_get_repos;
     config_impl->conf.ops->set_repos = axis2_conf_set_repos;
     config_impl->conf.ops->engage_module = axis2_conf_engage_module;
     
@@ -1183,11 +1190,16 @@
                                         axis2_env_t **env,
                                         axis2_qname_t *qname) 
 {
-    AXIS2_FUNC_PARAM_CHECK(conf, env, NULL);
-    AXIS2_PARAM_CHECK((*env)->error, qname, NULL);
+    axis2_conf_impl_t *conf_impl = NULL;
+    axis2_char_t *name = NULL;
     
-    return (axis2_module_desc_t *) axis2_hash_get(AXIS2_INTF_TO_IMPL(
-        conf)->modules, qname, sizeof(axis2_qname_t));
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, qname, NULL);
+    conf_impl = AXIS2_INTF_TO_IMPL(conf);
+
+    name = AXIS2_QNAME_TO_STRING(qname, env);
+    return (axis2_module_desc_t *) axis2_hash_get(conf_impl->modules, 
+        name, AXIS2_HASH_KEY_STRING);
 }
 
 /**
@@ -1688,16 +1700,6 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_conf_set_repos(axis2_conf_t *conf,
-                        axis2_env_t **env,
-                        axis2_char_t *axis2_repos)
-{
-    AXIS2_FUNC_PARAM_CHECK(conf, env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(conf)->axis2_repos = axis2_repos;
-    return AXIS2_SUCCESS;
-}
-
-axis2_status_t AXIS2_CALL
 axis2_conf_engage_module(axis2_conf_t *conf,
                         axis2_env_t **env,
                         axis2_qname_t *module_ref) 
@@ -1717,11 +1719,36 @@
     {
         axis2_file_t *file = NULL;
         axis2_char_t *file_name = NULL;
+        axis2_arch_reader_t *arch_reader = NULL;
+        axis2_char_t *repos_path = NULL;
+        axis2_arch_file_data_t *file_data = NULL;
+        axis2_char_t *temp_path1 = NULL;
+        axis2_char_t *temp_path2 = NULL;
+        axis2_char_t *temp_path3 = NULL;
+        axis2_char_t *path = NULL;
         
-        file = (axis2_file_t *) axis2_file_create(env);
+        arch_reader = axis2_arch_reader_create(env);
+        if(!arch_reader)
+        {
+            return AXIS2_FAILURE;
+        }
         file_name = AXIS2_QNAME_GET_LOCALPART(module_ref, env);
-        AXIS2_FILE_SET_NAME(file, env, file_name);
-        dep_engine = axis2_dep_engine_create(env);
+        file = (axis2_file_t *) AXIS2_ARCH_READER_CREATE_MODULE_ARCH(
+            arch_reader, env, file_name) ;
+        repos_path = AXIS2_CONF_GET_REPOS(conf, env);
+        temp_path1 = AXIS2_STRACAT(repos_path, AXIS2_PATH_SEP_STR, env);
+        temp_path2 = AXIS2_STRACAT(temp_path1, AXIS2_MODULE_FOLDER, env);
+        temp_path3 = AXIS2_STRACAT(temp_path2, AXIS2_PATH_SEP_STR, env);
+        path = AXIS2_STRACAT(temp_path3, file_name, env);
+        AXIS2_FREE((*env)->allocator, temp_path1);
+        AXIS2_FREE((*env)->allocator, temp_path2);
+        AXIS2_FREE((*env)->allocator, temp_path3);
+        AXIS2_FILE_SET_PATH(file, env, path);
+        file_data = axis2_arch_file_data_create_with_type_and_file(env,
+                AXIS2_MODULE, file);
+
+        dep_engine = axis2_dep_engine_create_with_repos_name(env, repos_path);
+        AXIS2_DEP_ENGINE_SET_CURRENT_FILE_ITEM(dep_engine, env, file_data);
         module_desc = AXIS2_DEP_ENGINE_BUILD_MODULE(dep_engine, env, file, conf);
         is_new_module = AXIS2_TRUE;
     }
@@ -1762,5 +1789,37 @@
     {
         axis2_conf_add_module(conf, env, module_desc);
     }
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_conf_get_repos(axis2_conf_t *conf,
+                        axis2_env_t **env)
+{
+    axis2_conf_impl_t *conf_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    conf_impl = AXIS2_INTF_TO_IMPL(conf);
+
+    return conf_impl->axis2_repos;
+
+}
+
+axis2_status_t AXIS2_CALL
+axis2_conf_set_repos(axis2_conf_t *conf,
+               axis2_env_t **env,
+               axis2_char_t *repos_path)
+{
+    axis2_conf_impl_t *conf_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    conf_impl = AXIS2_INTF_TO_IMPL(conf);
+
+    if(conf_impl->axis2_repos)
+    {
+        AXIS2_FREE((*env)->allocator, conf_impl->axis2_repos);
+        conf_impl->axis2_repos = NULL;
+    }
+    conf_impl->axis2_repos = AXIS2_STRDUP(repos_path, env);
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/mod_addr/mod_addr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/mod_addr/mod_addr.c?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_addr/mod_addr.c (original)
+++ webservices/axis2/trunk/c/modules/mod_addr/mod_addr.c Tue Feb  7 04:49:37 2006
@@ -16,12 +16,12 @@
 #include <axis2_module.h>
 #include <axis2_addr_mod.h>
 
-int 
+axis2_status_t 
 axis2_mod_addr_shutdown(axis2_module_t *module,
                         axis2_env_t **env,
                         axis2_conf_t *axis2_system);
 
-int 
+axis2_status_t
 axis2_mod_addr_init(axis2_module_t *module,
                         axis2_env_t **env,
                         axis2_conf_t *axis2_system);
@@ -50,7 +50,7 @@
     return module;
 }
 
-int 
+axis2_status_t 
 axis2_mod_addr_init(axis2_module_t *module,
                         axis2_env_t **env,
                         axis2_conf_t *axis2_system)
@@ -59,7 +59,7 @@
     return AXIS2_SUCCESS;
 }
 
-int 
+axis2_status_t 
 axis2_mod_addr_shutdown(axis2_module_t *module,
                         axis2_env_t **env,
                         axis2_conf_t *axis2_system)

Modified: webservices/axis2/trunk/c/modules/util/file.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/file.c?rev=375589&r1=375588&r2=375589&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/file.c (original)
+++ webservices/axis2/trunk/c/modules/util/file.c Tue Feb  7 04:49:37 2006
@@ -189,7 +189,11 @@
 {
     axis2_file_impl_t *file_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, path, AXIS2_FAILURE);
+    if(NULL == path)
+    {
+        /* path is optional */
+        return AXIS2_SUCCESS;
+    }
     file_impl = AXIS2_INTF_TO_IMPL(file);
     
     if(file_impl->path)



Mime
View raw message