[asterisk-commits] trunk r30934 - in /trunk: asterisk.c doc/asterisk-conf.txt

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue May 30 14:37:11 MST 2006


Author: kpfleming
Date: Tue May 30 16:37:11 2006
New Revision: 30934

URL: http://svn.digium.com/view/asterisk?rev=30934&view=rev
Log:
move processing of 'languageprefix' option to proper section of config file
document that option :-)

Modified:
    trunk/asterisk.c
    trunk/doc/asterisk-conf.txt

Modified: trunk/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/asterisk.c?rev=30934&r1=30933&r2=30934&view=diff
==============================================================================
--- trunk/asterisk.c (original)
+++ trunk/asterisk.c Tue May 30 16:37:11 2006
@@ -2190,8 +2190,8 @@
 	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 @@
 		} 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 @@
 			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 @@
 			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));
-		}
-		v = v->next;
+		} else if (!strcasecmp(v->name, "languageprefix")) {
+			ast_language_is_prefix = ast_true(v->value);
+		}
 	}
 	ast_config_destroy(cfg);
 }

Modified: trunk/doc/asterisk-conf.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/asterisk-conf.txt?rev=30934&r1=30933&r2=30934&view=diff
==============================================================================
--- trunk/doc/asterisk-conf.txt (original)
+++ trunk/doc/asterisk-conf.txt Tue May 30 16:37:11 2006
@@ -65,6 +65,10 @@
 execincludes = yes | no 			; Allow #exec entries in configuration files
 dontwarn = yes | no				; Don't over-inform the Asterisk sysadm, he's a guru
 systemname = <a_string>				; 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 <path>/<lang>/<file>
+						; when on, sound files are search as <lang>/<path>/<file>
+						; (only affects relative paths for sound files)
 
 [files]
 ; Changing the following lines may compromise your security



More information about the asterisk-commits mailing list