[commit] r2795 - freeswitch/trunk/src/mod/languages/mod_mono
Author: james Date: Sat Sep 23 00:53:20 2006 New Revision: 2795 Modified: freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c Log: More checks. Modified: freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c ============================================================================== --- freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c (original) +++ freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c Sat Sep 23 00:53:20 2006 @@ -96,12 +96,12 @@ char *assembly_dir = (char *) switch_core_alloc(mono_pool, assembly_dir_len); char *assembly_file = (char *) switch_core_alloc(mono_pool, assembly_file_len); - apr_finfo_t *finfo = (apr_finfo_t *) switch_core_alloc(mono_pool, sizeof(*finfo)); + apr_finfo_t *assembly_finfo = (apr_finfo_t *) switch_core_alloc(mono_pool, sizeof(*assembly_finfo)); snprintf(assembly_dir, assembly_dir_len, "%s/%s", SWITCH_GLOBAL_dirs.base_dir, SWITCH_MONO_LIBDIR); snprintf(assembly_file, assembly_file_len, "%s/%s%s", SWITCH_GLOBAL_dirs.base_dir, SWITCH_MONO_LIBDIR, SWITCH_MONO_ASSEMBLY); - if (apr_stat(finfo, assembly_file, 0, mono_pool) != SWITCH_STATUS_SUCCESS) { + if (apr_stat(assembly_finfo, assembly_file, 0, mono_pool) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Could not find FreeSwitch.NET assembly\n"); return SWITCH_STATUS_FALSE; } @@ -178,6 +178,13 @@ */ switch_status_t mod_mono_load_modules(const char *module_dir) { + apr_finfo_t *module_finfo = (apr_finfo_t *) switch_core_alloc(mono_pool, sizeof(*module_finfo)); + + if (apr_stat(module_finfo, module_dir, 0, mono_pool) != SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not access module dir!.\n"); + return SWITCH_STATUS_FALSE; + } + apr_dir_t *module_dir_handle; char *file; size_t len;
participants (1)
-
Freeswitch SVN