mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
[core] use fspr prefixed symbols instead of apr
This commit is contained in:
committed by
Andrey Volk
parent
5c2726f413
commit
85d25e269b
@@ -34,14 +34,14 @@
|
||||
#include <switch.h>
|
||||
#include "private/switch_core_pvt.h"
|
||||
|
||||
/* for apr_pstrcat */
|
||||
#include <apr_strings.h>
|
||||
/* for fspr_pstrcat */
|
||||
#include <fspr_strings.h>
|
||||
|
||||
/* for apr_env_get and apr_env_set */
|
||||
#include <apr_env.h>
|
||||
/* for fspr_env_get and fspr_env_set */
|
||||
#include <fspr_env.h>
|
||||
|
||||
/* for apr file and directory handling */
|
||||
#include <apr_file_io.h>
|
||||
/* for fspr file and directory handling */
|
||||
#include <fspr_file_io.h>
|
||||
|
||||
typedef struct switch_file_node_s {
|
||||
const switch_file_interface_t *ptr;
|
||||
@@ -1633,7 +1633,7 @@ static switch_status_t switch_loadable_module_load_file(char *path, char *filena
|
||||
{
|
||||
switch_loadable_module_t *module = NULL;
|
||||
switch_dso_lib_t dso = NULL;
|
||||
apr_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
fspr_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
switch_loadable_module_function_table_t *interface_struct_handle = NULL;
|
||||
switch_loadable_module_function_table_t *mod_interface_functions = NULL;
|
||||
char *struct_name = NULL;
|
||||
@@ -2061,14 +2061,14 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
|
||||
static void switch_loadable_module_path_init()
|
||||
{
|
||||
char *path = NULL, *working = NULL;
|
||||
apr_dir_t *perl_dir_handle = NULL;
|
||||
fspr_dir_t *perl_dir_handle = NULL;
|
||||
|
||||
apr_env_get(&path, "path", loadable_modules.pool);
|
||||
apr_filepath_get(&working, APR_FILEPATH_NATIVE, loadable_modules.pool);
|
||||
fspr_env_get(&path, "path", loadable_modules.pool);
|
||||
fspr_filepath_get(&working, APR_FILEPATH_NATIVE, loadable_modules.pool);
|
||||
|
||||
if (apr_dir_open(&perl_dir_handle, ".\\perl", loadable_modules.pool) == APR_SUCCESS) {
|
||||
apr_dir_close(perl_dir_handle);
|
||||
apr_env_set("path", apr_pstrcat(loadable_modules.pool, path, ";", working, "\\perl", NULL), loadable_modules.pool);
|
||||
if (fspr_dir_open(&perl_dir_handle, ".\\perl", loadable_modules.pool) == APR_SUCCESS) {
|
||||
fspr_dir_close(perl_dir_handle);
|
||||
fspr_env_set("path", fspr_pstrcat(loadable_modules.pool, path, ";", working, "\\perl", NULL), loadable_modules.pool);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -2076,9 +2076,9 @@ static void switch_loadable_module_path_init()
|
||||
SWITCH_DECLARE(switch_status_t) switch_loadable_module_init(switch_bool_t autoload)
|
||||
{
|
||||
|
||||
apr_finfo_t finfo = { 0 };
|
||||
apr_dir_t *module_dir_handle = NULL;
|
||||
apr_int32_t finfo_flags = APR_FINFO_DIRENT | APR_FINFO_TYPE | APR_FINFO_NAME;
|
||||
fspr_finfo_t finfo = { 0 };
|
||||
fspr_dir_t *module_dir_handle = NULL;
|
||||
fspr_int32_t finfo_flags = APR_FINFO_DIRENT | APR_FINFO_TYPE | APR_FINFO_NAME;
|
||||
char *precf = "pre_load_modules.conf";
|
||||
char *cf = "modules.conf";
|
||||
char *pcf = "post_load_modules.conf";
|
||||
@@ -2286,12 +2286,12 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_init(switch_bool_t autolo
|
||||
}
|
||||
|
||||
if (all) {
|
||||
if (apr_dir_open(&module_dir_handle, SWITCH_GLOBAL_dirs.mod_dir, loadable_modules.pool) != APR_SUCCESS) {
|
||||
if (fspr_dir_open(&module_dir_handle, SWITCH_GLOBAL_dirs.mod_dir, loadable_modules.pool) != APR_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Can't open directory: %s\n", SWITCH_GLOBAL_dirs.mod_dir);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
while (apr_dir_read(&finfo, finfo_flags, module_dir_handle) == APR_SUCCESS) {
|
||||
while (fspr_dir_read(&finfo, finfo_flags, module_dir_handle) == APR_SUCCESS) {
|
||||
const char *fname = finfo.fname;
|
||||
|
||||
if (finfo.filetype != APR_REG) {
|
||||
@@ -2312,7 +2312,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_init(switch_bool_t autolo
|
||||
|
||||
switch_loadable_module_load_module(SWITCH_GLOBAL_dirs.mod_dir, fname, SWITCH_FALSE, &err);
|
||||
}
|
||||
apr_dir_close(module_dir_handle);
|
||||
fspr_dir_close(module_dir_handle);
|
||||
}
|
||||
|
||||
switch_loadable_module_runtime();
|
||||
|
||||
Reference in New Issue
Block a user