From: Kevin P. Fleming Date: Tue, 30 May 2006 21:37:11 +0000 (+0000) Subject: move processing of 'languageprefix' option to proper section of config file X-Git-Tag: 1.4.0-beta1~1149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6a44ed7b314acbe580fb75a495b881a47bb8dfb;p=thirdparty%2Fasterisk.git move processing of 'languageprefix' option to proper section of config file document that option :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30934 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/asterisk.c b/asterisk.c index aa235c7d02..ad92a5c0f2 100644 --- a/asterisk.c +++ b/asterisk.c @@ -2190,8 +2190,8 @@ static void ast_readconfig(void) if (!cfg) { return; } - v = ast_variable_browse(cfg, "files"); - while (v) { + + for (v = ast_variable_browse(cfg, "files"); v; v = v->next) { if (!strcasecmp(v->name, "astctlpermissions")) { ast_copy_string(ast_config_AST_CTL_PERMISSIONS, v->value, sizeof(ast_config_AST_CTL_PERMISSIONS)); } else if (!strcasecmp(v->name, "astctlowner")) { @@ -2201,10 +2201,9 @@ static void ast_readconfig(void) } else if (!strcasecmp(v->name, "astctl")) { ast_copy_string(ast_config_AST_CTL, v->value, sizeof(ast_config_AST_CTL)); } - v = v->next; } - v = ast_variable_browse(cfg, "directories"); - while(v) { + + for (v = ast_variable_browse(cfg, "directories"); v; v = v->next) { if (!strcasecmp(v->name, "astetcdir")) { ast_copy_string(ast_config_AST_CONFIG_DIR, v->value, sizeof(ast_config_AST_CONFIG_DIR)); } else if (!strcasecmp(v->name, "astspooldir")) { @@ -2226,13 +2225,10 @@ static void ast_readconfig(void) ast_copy_string(ast_config_AST_RUN_DIR, v->value, sizeof(ast_config_AST_RUN_DIR)); } else if (!strcasecmp(v->name, "astmoddir")) { ast_copy_string(ast_config_AST_MODULE_DIR, v->value, sizeof(ast_config_AST_MODULE_DIR)); - } else if (!strcasecmp(v->name, "languageprefix")) { - ast_language_is_prefix = ast_true(v->value); } - v = v->next; } - v = ast_variable_browse(cfg, "options"); - while(v) { + + for (v = ast_variable_browse(cfg, "options"); v; v = v->next) { /* verbose level (-v at startup) */ if (!strcasecmp(v->name, "verbose")) { option_verbose = atoi(v->value); @@ -2311,8 +2307,9 @@ static void ast_readconfig(void) ast_copy_string(ast_config_AST_RUN_GROUP, v->value, sizeof(ast_config_AST_RUN_GROUP)); } else if (!strcasecmp(v->name, "systemname")) { ast_copy_string(ast_config_AST_SYSTEM_NAME, v->value, sizeof(ast_config_AST_SYSTEM_NAME)); + } else if (!strcasecmp(v->name, "languageprefix")) { + ast_language_is_prefix = ast_true(v->value); } - v = v->next; } ast_config_destroy(cfg); } diff --git a/doc/asterisk-conf.txt b/doc/asterisk-conf.txt index 72c81098a1..a838bc561f 100644 --- a/doc/asterisk-conf.txt +++ b/doc/asterisk-conf.txt @@ -65,6 +65,10 @@ maxcalls = 255 ; The maximum number of concurrent calls you want to allow execincludes = yes | no ; Allow #exec entries in configuration files dontwarn = yes | no ; Don't over-inform the Asterisk sysadm, he's a guru systemname = ; System name. Used to prefix CDR uniqueid and to fill ${SYSTEMNAME} +languageprefix = yes | no ; Should language code be last component of sound file name or first? + ; when off, sound files are searched as // + ; when on, sound files are search as // + ; (only affects relative paths for sound files) [files] ; Changing the following lines may compromise your security