Return-Path: Delivered-To: apmail-ws-axis-cvs-archive@www.apache.org Received: (qmail 10285 invoked from network); 18 Jan 2006 07:04:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Jan 2006 07:04:56 -0000 Received: (qmail 74727 invoked by uid 500); 18 Jan 2006 07:04:55 -0000 Delivered-To: apmail-ws-axis-cvs-archive@ws.apache.org Received: (qmail 74677 invoked by uid 500); 18 Jan 2006 07:04:54 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 74666 invoked by uid 500); 18 Jan 2006 07:04:54 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 74663 invoked by uid 99); 18 Jan 2006 07:04:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2006 23:04:54 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 17 Jan 2006 23:04:53 -0800 Received: (qmail 10152 invoked by uid 65534); 18 Jan 2006 07:04:32 -0000 Message-ID: <20060118070432.10150.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r370072 - in /webservices/axis2/trunk/c: include/ modules/core/deployment/ modules/core/engine/ modules/util/ Date: Wed, 18 Jan 2006 07:04:30 -0000 To: axis2-cvs@ws.apache.org From: damitha@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: damitha Date: Tue Jan 17 23:03:02 2006 New Revision: 370072 URL: http://svn.apache.org/viewcvs?rev=370072&view=rev Log: File structure is hidden in .c file Modified: webservices/axis2/trunk/c/include/axis2_error.h webservices/axis2/trunk/c/include/axis2_file.h webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c webservices/axis2/trunk/c/modules/core/engine/conf.c webservices/axis2/trunk/c/modules/util/dir_handler.c webservices/axis2/trunk/c/modules/util/file.c Modified: webservices/axis2/trunk/c/include/axis2_error.h URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_error.h?rev=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/include/axis2_error.h (original) +++ webservices/axis2/trunk/c/include/axis2_error.h Tue Jan 17 23:03:02 2006 @@ -450,6 +450,7 @@ /* Listen failed for the server socket */ AXIS2_ERROR_SOCKET_LISTEN_FAILED, + AXIS2_ERROR_FILE_NAME_NOT_SET, /** The following has to be the last error value all the time. All other error codes should appear above this. AXIS2_ERROR_LAST is used to track the number of error codes present Modified: webservices/axis2/trunk/c/include/axis2_file.h URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_file.h?rev=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/include/axis2_file.h (original) +++ webservices/axis2/trunk/c/include/axis2_file.h Tue Jan 17 23:03:02 2006 @@ -29,42 +29,92 @@ #endif typedef struct axis2_file axis2_file_t; +typedef struct axis2_file_ops axis2_file_ops_t; /** * @defgroup axis2_file File * @ingroup axis2_util * @{ */ - - /** - * create new file - * @return file newly created file - */ - AXIS2_DECLARE(axis2_file_t *) - axis2_file_create(axis2_env_t **env); - AXIS2_DECLARE(axis2_status_t) - axis2_file_free (axis2_file_t *file, - axis2_env_t **env); +/** + * @brief Description Builder ops struct + * Encapsulator struct for ops of axis2_desc_builder + */ +AXIS2_DECLARE_DATA struct axis2_file_ops +{ + + axis2_status_t (AXIS2_CALL * + free) (axis2_file_t *file, + axis2_env_t **env); + + axis2_status_t (AXIS2_CALL * + set_name)(axis2_file_t *file, + axis2_env_t **env, + axis2_char_t *name); + + axis2_char_t *(AXIS2_CALL * + get_name)(axis2_file_t *file, + axis2_env_t **env); + + axis2_status_t (AXIS2_CALL * + set_timestamp)(axis2_file_t *file, + axis2_env_t **env, + AXIS2_TIME_T timestamp); + + AXIS2_TIME_T (AXIS2_CALL * + get_timestamp)(axis2_file_t *file, + axis2_env_t **env); /** * create a newly allocated clone of the argument file */ - axis2_file_t *AXIS2_CALL - axis2_file_clone(axis2_file_t *file, + axis2_file_t *(AXIS2_CALL * + clone)(axis2_file_t *file, axis2_env_t **env); +}; - /** + +/** * @brief * To store filename and timestamp of each module or service archive file */ - struct axis2_file - { - axis2_char_t *name; - AXIS2_TIME_T time_stamp; - - - }; +AXIS2_DECLARE_DATA struct axis2_file +{ + axis2_file_ops_t *ops; +}; + +/** + * create new file + * @return file newly created file + */ +AXIS2_DECLARE(axis2_file_t *) +axis2_file_create(axis2_env_t **env); + +/*************************** Function macros **********************************/ + +#define AXIS2_FILE_FREE(file, env) \ + ((file)->ops->free (file, env)) + +#define AXIS2_FILE_GET_NAME(file, env) \ + ((file)->ops->get_name (file, env)) + +#define AXIS2_FILE_SET_NAME(file, env, name) \ + ((file)->ops->set_name (file, env, name)) + +#define AXIS2_FILE_GET_TIMESTAMP(file, env) \ + ((file)->ops->get_timestamp (file, env)) + +#define AXIS2_FILE_SET_TIMESTAMP(file, env, timestamp) \ + ((file)->ops->set_timestamp (file, env, timestamp)) + +#define AXIS2_FILE_CLONE(file, env) \ + ((file)->ops->clone (file, env)) + + + +/*************************** End of function macros ***************************/ + /** @} */ Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c?rev=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c (original) +++ webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c Tue Jan 17 23:03:02 2006 @@ -197,7 +197,7 @@ return NULL; } file_data_impl->type = type; - file_data_impl->file = axis2_file_clone(file, env); + file_data_impl->file = AXIS2_FILE_CLONE(file, env); return &(file_data_impl->arch_file_data); } @@ -232,7 +232,7 @@ if(file_data_impl->file) { - axis2_file_free(file_data_impl->file, env); + AXIS2_FILE_FREE(file_data_impl->file, env); file_data_impl->file = NULL; } if(file_data_impl->msg_recv) @@ -310,8 +310,12 @@ axis2_arch_file_data_get_name(axis2_arch_file_data_t *file_data, axis2_env_t **env) { + axis2_arch_file_data_impl_t *file_data_impl = NULL; + AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL); - return AXIS2_INTF_TO_IMPL(file_data)->file->name; + file_data_impl = AXIS2_INTF_TO_IMPL(file_data); + + return AXIS2_FILE_GET_NAME(file_data_impl->file, env); } axis2_char_t *AXIS2_CALL @@ -324,7 +328,7 @@ file_data_impl = AXIS2_INTF_TO_IMPL(file_data); if(NULL != file_data_impl->file) { - svc_name = file_data_impl->file->name; + svc_name = AXIS2_FILE_GET_NAME(file_data_impl->file, env); } else { 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=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original) +++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Tue Jan 17 23:03:02 2006 @@ -981,11 +981,13 @@ int i = 0; axis2_hash_t *ops = NULL; axis2_hash_index_t *index_i = NULL; + axis2_char_t *file_name = NULL; svc = (axis2_svc_t *) AXIS2_ARRAY_LIST_GET(svcs, env, i); axis2_dep_engine_load_svc_props(dep_engine, env, svc); file = AXIS2_ARCH_FILE_DATA_GET_FILE(engine_impl->curr_file, env); - AXIS2_SVC_SET_FILENAME(svc, env, file->name); + file_name = AXIS2_FILE_GET_NAME(file, env); + AXIS2_SVC_SET_FILENAME(svc, env, file_name); /* module form serviceGroup */ grp_modules = AXIS2_SVC_GRP_GET_MODULES(svc_metadata, env); @@ -1521,6 +1523,7 @@ axis2_flow_t *out_flow = NULL; axis2_flow_t *in_fault_flow = NULL; axis2_flow_t *out_fault_flow = NULL; + axis2_char_t *file_name = NULL; AXIS2_FUNC_PARAM_CHECK(dep_engine, env, NULL); AXIS2_PARAM_CHECK((*env)->error, module_archive, NULL); @@ -1533,8 +1536,9 @@ env, AXIS2_MODULE, module_archive); module = axis2_module_desc_create(env); arch_reader = axis2_arch_reader_create(env); - AXIS2_ARCH_READER_READ_MODULE_ARCH(arch_reader, env, module_archive->name, - dep_engine, module); + file_name = AXIS2_FILE_GET_NAME(module_archive, env); + AXIS2_ARCH_READER_READ_MODULE_ARCH(arch_reader, env, file_name, dep_engine, + module); in_flow = AXIS2_MODULE_DESC_GET_INFLOW(module, env); if(NULL != in_flow) Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original) +++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Tue Jan 17 23:03:02 2006 @@ -894,7 +894,6 @@ axis2_char_t *file_name_l = NULL; axis2_char_t *short_name = NULL; int len = 0; - printf("short_file_name*:%s\n", short_file_name); AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL); AXIS2_PARAM_CHECK((*env)->error, short_file_name, NULL); file_name_l = AXIS2_STRDUP(short_file_name, env); @@ -905,7 +904,6 @@ } len = AXIS2_STRLEN(AXIS2_LIB_PREFIX); short_name = &file_name_l[len]; - printf("short_name:%s\n", short_name); return short_name; } Modified: webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c?rev=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c (original) +++ webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c Tue Jan 17 23:03:02 2006 @@ -246,10 +246,10 @@ long last_modified_date = 0; axis2_arch_file_data_t *file_data = NULL; - last_modified_date = file->time_stamp; + last_modified_date = AXIS2_FILE_GET_TIMESTAMP(file, env); ws_info = axis2_ws_info_create_with_file_name_and_last_modified_date_and_type( - env, file->name, last_modified_date, AXIS2_SVC); + env, AXIS2_FILE_GET_NAME(file, env), last_modified_date, AXIS2_SVC); AXIS2_ARRAY_LIST_ADD(info_list_impl->info_list, env, ws_info); file_data = axis2_arch_file_data_create_with_type_and_file(env, AXIS2_SVC, file); @@ -271,10 +271,10 @@ long last_modified_date = 0; axis2_arch_file_data_t *file_data = NULL; - last_modified_date = file->time_stamp; + last_modified_date = AXIS2_FILE_GET_TIMESTAMP(file, env); ws_info = axis2_ws_info_create_with_file_name_and_last_modified_date_and_type( - env, file->name, last_modified_date, AXIS2_MODULE); + env, AXIS2_FILE_GET_NAME(file, env), last_modified_date, AXIS2_MODULE); AXIS2_ARRAY_LIST_ADD(info_list_impl->info_list, env, ws_info); file_data = axis2_arch_file_data_create_with_type_and_file(env, AXIS2_MODULE, file); @@ -286,7 +286,7 @@ } } - info_list_name = AXIS2_STRDUP(file->name, env); + info_list_name = AXIS2_FILE_GET_NAME(file, env); if(!info_list_name) { return AXIS2_FAILURE; @@ -338,7 +338,7 @@ AXIS2_PARAM_CHECK((*env)->error, ws_info, AXIS2_FAILURE); last_modified_date = AXIS2_WS_INFO_GET_LAST_MODIFIED_DATE(ws_info, env); - return (last_modified_date != file->time_stamp); + return (last_modified_date != AXIS2_FILE_GET_TIMESTAMP(file, env)); } axis2_bool_t AXIS2_CALL 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=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/modules/core/engine/conf.c (original) +++ webservices/axis2/trunk/c/modules/core/engine/conf.c Tue Jan 17 23:03:02 2006 @@ -1703,9 +1703,11 @@ if(NULL == module_desc) { axis2_file_t *file = NULL; + axis2_char_t *file_name = NULL; file = (axis2_file_t *) axis2_file_create(env); - file->name = AXIS2_QNAME_GET_LOCALPART(module_ref, env); + file_name = AXIS2_QNAME_GET_LOCALPART(module_ref, env); + AXIS2_FILE_SET_NAME(file, env, file_name); dep_engine = axis2_dep_engine_create(env); module_desc = AXIS2_DEP_ENGINE_BUILD_MODULE(dep_engine, env, file, conf); is_new_module = AXIS2_TRUE; Modified: webservices/axis2/trunk/c/modules/util/dir_handler.c URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/dir_handler.c?rev=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/modules/util/dir_handler.c (original) +++ webservices/axis2/trunk/c/modules/util/dir_handler.c Tue Jan 17 23:03:02 2006 @@ -34,7 +34,8 @@ { axis2_array_list_t *file_list = NULL; struct stat *buf = NULL; - int count,i; + int count = 1; + int i = 0; struct direct **files = NULL; int file_select(); axis2_status_t status = AXIS2_FAILURE; @@ -49,7 +50,7 @@ return NULL; } - for (i=1; i < count + 1 ; ++i) + for (i = 1; i < (count + 1) ; ++i ) { int len = 0; axis2_char_t *fname = NULL; @@ -57,13 +58,14 @@ axis2_char_t *path = NULL; fname = files[i-1]->d_name; + printf("fname:%s\n", fname); arch_file = (axis2_file_t *) axis2_file_create(env); if(!arch_file) { AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); return NULL; } - arch_file->name = fname; + AXIS2_FILE_SET_NAME(arch_file, env, fname); len = strlen(pathname) + strlen(fname) + 3; path = AXIS2_MALLOC((*env)->allocator, len); if(!path) @@ -81,7 +83,7 @@ return NULL; } stat(path, buf); - arch_file->time_stamp = (time_t) buf->st_ctime; + AXIS2_FILE_SET_TIMESTAMP(arch_file, env, (time_t) buf->st_ctime); status = AXIS2_ARRAY_LIST_ADD(file_list, env, arch_file); if(path) { Modified: webservices/axis2/trunk/c/modules/util/file.c URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/file.c?rev=370072&r1=370071&r2=370072&view=diff ============================================================================== --- webservices/axis2/trunk/c/modules/util/file.c (original) +++ webservices/axis2/trunk/c/modules/util/file.c Tue Jan 17 23:03:02 2006 @@ -17,26 +17,83 @@ #include #include +typedef struct axis2_file_impl +{ + axis2_file_t file; + axis2_char_t *name; + AXIS2_TIME_T timestamp; + + +}axis2_file_impl_t; + +#define AXIS2_INTF_TO_IMPL(file) \ + ((axis2_file_impl_t *) file) + + + +axis2_status_t AXIS2_CALL +axis2_file_free (axis2_file_t *file, + axis2_env_t **env); + +axis2_status_t AXIS2_CALL +axis2_file_set_name(axis2_file_t *file, + axis2_env_t **env, + axis2_char_t *name); + +axis2_char_t *AXIS2_CALL +axis2_file_get_name(axis2_file_t *file, + axis2_env_t **env); + +axis2_status_t AXIS2_CALL +axis2_file_set_timestamp(axis2_file_t *file, + axis2_env_t **env, + AXIS2_TIME_T timestamp); + +AXIS2_TIME_T AXIS2_CALL +axis2_file_get_timestamp(axis2_file_t *file, + axis2_env_t **env); + +axis2_file_t *AXIS2_CALL +axis2_file_clone(axis2_file_t *file, + axis2_env_t **env); + /************************** End of function prototypes ************************/ -axis2_file_t * AXIS2_CALL +axis2_file_t *AXIS2_CALL axis2_file_create(axis2_env_t **env) { - axis2_file_t *file = NULL; + axis2_file_impl_t *file_impl = NULL; AXIS2_ENV_CHECK(env, NULL); - file = (axis2_file_t *) AXIS2_MALLOC((*env)->allocator, sizeof(axis2_file_t)); + file_impl = (axis2_file_impl_t *) AXIS2_MALLOC((*env)->allocator, + sizeof(axis2_file_impl_t)); - if(NULL == file) + if(NULL == file_impl) { AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); return NULL; } - file->name = NULL; - file->time_stamp = 0; + file_impl->name = NULL; + file_impl->timestamp = 0; + + file_impl->file.ops = + AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_file_ops_t)); + if(NULL == file_impl->file.ops) + { + axis2_file_free(&(file_impl->file), env); + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); + return NULL; + } + + file_impl->file.ops->free = axis2_file_free; + file_impl->file.ops->set_name = axis2_file_set_name; + file_impl->file.ops->get_name = axis2_file_get_name; + file_impl->file.ops->set_timestamp = axis2_file_set_timestamp; + file_impl->file.ops->get_timestamp = axis2_file_get_timestamp; + file_impl->file.ops->clone = axis2_file_clone; - return file; + return &(file_impl->file); } /***************************Function implementation****************************/ @@ -45,33 +102,114 @@ axis2_file_free (axis2_file_t *file, axis2_env_t **env) { - /*if(file->name) + axis2_file_impl_t *file_impl = NULL; + AXIS2_ENV_CHECK(env, AXIS2_FAILURE); + file_impl = AXIS2_INTF_TO_IMPL(file); + + if(file_impl->name) + { + AXIS2_FREE((*env)->allocator, file_impl->name); + file_impl->name = NULL; + } + + if(file_impl) + { + AXIS2_FREE((*env)->allocator, file_impl); + file_impl = NULL; + } + return AXIS2_SUCCESS; +} + +axis2_status_t AXIS2_CALL +axis2_file_set_name(axis2_file_t *file, + axis2_env_t **env, + axis2_char_t *name) +{ + axis2_file_impl_t *file_impl = NULL; + AXIS2_ENV_CHECK(env, AXIS2_FAILURE); + AXIS2_PARAM_CHECK((*env)->error, name, AXIS2_FAILURE); + file_impl = AXIS2_INTF_TO_IMPL(file); + + if(file_impl->name) + { + AXIS2_FREE((*env)->allocator, file_impl->name); + file_impl->name = NULL; + } + file_impl->name = AXIS2_STRDUP(name, env); + if(!file_impl->name) { - AXIS2_FREE((*env)->allocator, file->name); - file->name = NULL; - }*/ + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); + return AXIS2_FAILURE; + } + return AXIS2_SUCCESS; +} + +axis2_char_t *AXIS2_CALL +axis2_file_get_name(axis2_file_t *file, + axis2_env_t **env) +{ + axis2_file_impl_t *file_impl = NULL; + axis2_char_t *name = NULL; + + AXIS2_FUNC_PARAM_CHECK(file, env, NULL); + file_impl = AXIS2_INTF_TO_IMPL(file); - if(file) + if(!file_impl->name) + { + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_FILE_NAME_NOT_SET, AXIS2_FAILURE); + return NULL; + } + name = AXIS2_STRDUP(file_impl->name, env); + if(!name) { - AXIS2_FREE((*env)->allocator, file); - file = NULL; + AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); + return NULL; } + return name; +} + +axis2_status_t AXIS2_CALL +axis2_file_set_timestamp(axis2_file_t *file, + axis2_env_t **env, + AXIS2_TIME_T timestamp) +{ + axis2_file_impl_t *file_impl = NULL; + + AXIS2_ENV_CHECK(env, AXIS2_FAILURE); + file_impl = AXIS2_INTF_TO_IMPL(file); + + file_impl->timestamp = timestamp; + return AXIS2_SUCCESS; } +AXIS2_TIME_T AXIS2_CALL +axis2_file_get_timestamp(axis2_file_t *file, + axis2_env_t **env) +{ + axis2_file_impl_t *file_impl = NULL; + AXIS2_ENV_CHECK(env, NULL); + file_impl = AXIS2_INTF_TO_IMPL(file); + return file_impl->timestamp; +} + axis2_file_t *AXIS2_CALL axis2_file_clone(axis2_file_t *file, axis2_env_t **env) { + axis2_file_impl_t *file_impl = NULL; axis2_file_t *new_file = NULL; - AXIS2_FUNC_PARAM_CHECK(file, env, NULL); + axis2_status_t status = AXIS2_FAILURE; + + AXIS2_ENV_CHECK(env, NULL); + file_impl = AXIS2_INTF_TO_IMPL(file); + new_file = axis2_file_create(env); - new_file->name = AXIS2_STRDUP(file->name, env); - if(!new_file->name) + status = AXIS2_FILE_SET_NAME(new_file, env, file_impl->name); + if(AXIS2_SUCCESS != status) { - axis2_file_free(new_file, env); - new_file = NULL; + return NULL; } - new_file->time_stamp = file->time_stamp; + AXIS2_FILE_SET_TIMESTAMP(new_file, env, file_impl->timestamp); return new_file; }