aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-15 22:53:53 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-15 22:53:53 +0000
commitdb5a6fcfc324f2f1d6e383d1bdcc0bcd12444eeb (patch)
tree296383c1155d0fa39668e6028e41884b18443dd4 /asterisk.c
parentddb97bd2b53e57061116ed635c6818f6ab7ccda8 (diff)
We are shaking up trunk tonight! allow data dir to be specified (issue #6967 reported by tzafrir)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20330 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rw-r--r--asterisk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/asterisk.c b/asterisk.c
index ad9cfb831..9fd967497 100644
--- a/asterisk.c
+++ b/asterisk.c
@@ -206,6 +206,7 @@ char ast_config_AST_MODULE_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_SPOOL_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_MONITOR_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_VAR_DIR[AST_CONFIG_MAX_PATH];
+char ast_config_AST_DATA_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_LOG_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_AGI_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_DB[AST_CONFIG_MAX_PATH];
@@ -2081,6 +2082,7 @@ static void ast_readconfig(void)
ast_copy_string(ast_config_AST_MODULE_DIR, AST_MODULE_DIR, sizeof(ast_config_AST_MODULE_DIR));
snprintf(ast_config_AST_MONITOR_DIR, sizeof(ast_config_AST_MONITOR_DIR) - 1, "%s/monitor", ast_config_AST_SPOOL_DIR);
ast_copy_string(ast_config_AST_VAR_DIR, AST_VAR_DIR, sizeof(ast_config_AST_VAR_DIR));
+ ast_copy_string(ast_config_AST_DATA_DIR, AST_DATA_DIR, sizeof(ast_config_AST_DATA_DIR));
ast_copy_string(ast_config_AST_LOG_DIR, AST_LOG_DIR, sizeof(ast_config_AST_LOG_DIR));
ast_copy_string(ast_config_AST_AGI_DIR, AST_AGI_DIR, sizeof(ast_config_AST_AGI_DIR));
ast_copy_string(ast_config_AST_DB, AST_DB, sizeof(ast_config_AST_DB));
@@ -2117,6 +2119,8 @@ static void ast_readconfig(void)
ast_copy_string(ast_config_AST_VAR_DIR, v->value, sizeof(ast_config_AST_VAR_DIR));
snprintf(ast_config_AST_DB, sizeof(ast_config_AST_DB), "%s/astdb", v->value);
snprintf(ast_config_AST_KEY_DIR, sizeof(ast_config_AST_KEY_DIR), "%s/keys", v->value);
+ } else if (!strcasecmp(v->name, "astdatadir")) {
+ ast_copy_string(ast_config_AST_DATA_DIR, v->value, sizeof(ast_config_AST_DATA_DIR));
} else if (!strcasecmp(v->name, "astlogdir")) {
ast_copy_string(ast_config_AST_LOG_DIR, v->value, sizeof(ast_config_AST_LOG_DIR));
} else if (!strcasecmp(v->name, "astagidir")) {