* switch_loadable_module.c -- Loadable Modules
*
*/
-#include <switch_console.h>
+#include <switch.h>
struct switch_loadable_module {
}
}
+#ifdef WIN32
+static void switch_loadable_module_path_init()
+{
+ char *path =NULL, *working =NULL;
+ apr_dir_t *perl_dir_handle = NULL;
+
+ apr_env_get(&path, "path", loadable_modules.pool);\r
+ apr_filepath_get(&working, APR_FILEPATH_NATIVE , loadable_modules.pool);\r
+
+ if (apr_dir_open(&perl_dir_handle, ".\\perl", loadable_modules.pool) == APR_SUCCESS) {\r
+ apr_dir_close(perl_dir_handle);\r
+ apr_env_set("path", \r
+ apr_pstrcat(loadable_modules.pool, path, ";", working, "\\perl", NULL), \r
+ loadable_modules.pool);\r
+ }\r
+}
+#endif
+
SWITCH_DECLARE(switch_status) switch_loadable_module_init()
{
switch_core_new_memory_pool(&loadable_modules.pool);
+#ifdef WIN32
+ switch_loadable_module_path_init();\r
+#endif
+
switch_core_hash_init(&loadable_modules.module_hash, loadable_modules.pool);
switch_core_hash_init(&loadable_modules.endpoint_hash, loadable_modules.pool);
switch_core_hash_init(&loadable_modules.codec_hash, loadable_modules.pool);