From 10f70a8321d064d77106d056a361876d4d36628d Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Tue, 18 Dec 2007 10:24:58 +0000 Subject: make configuration variable const so they are not accidentally modified. This requires casting the strings in asterisk.c when writing to them, so we do it through a macro to do it consistently. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93603 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- utils/ael_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'utils/ael_main.c') diff --git a/utils/ael_main.c b/utils/ael_main.c index 830b83807..68b5dc479 100644 --- a/utils/ael_main.c +++ b/utils/ael_main.c @@ -82,8 +82,8 @@ struct namelist *globalvars_last; int conts=0, extens=0, priors=0; char last_exten[18000]; -char ast_config_AST_CONFIG_DIR[PATH_MAX]; -char ast_config_AST_VAR_DIR[PATH_MAX]; +const char ast_config_AST_CONFIG_DIR[PATH_MAX]; +const char ast_config_AST_VAR_DIR[PATH_MAX]; void ast_cli_register_multiple(void); int ast_add_extension2(struct ast_context *con, @@ -514,14 +514,14 @@ int main(int argc, char **argv) } if( use_curr_dir ) { - strcpy(ast_config_AST_CONFIG_DIR, "."); + strcpy((char *)ast_config_AST_CONFIG_DIR, "."); localized_use_local_dir(); } else { - strcpy(ast_config_AST_CONFIG_DIR, "/etc/asterisk"); + strcpy((char *)ast_config_AST_CONFIG_DIR, "/etc/asterisk"); localized_use_conf_dir(); } - strcpy(ast_config_AST_VAR_DIR, "/var/lib/asterisk"); + strcpy((char *)ast_config_AST_VAR_DIR, "/var/lib/asterisk"); if( dump_extensions ) { dumpfile = fopen("extensions.conf.aeldump","w"); -- cgit v1.2.3