From: Tzafrir Cohen Date: Tue, 13 Sep 2011 21:37:58 +0000 (+0000) Subject: do parse defaultlanguage from asterisk.conf X-Git-Tag: 10.0.0-beta2~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e54d13c738046ce19a652673898d4ab5adefef3;p=thirdparty%2Fasterisk.git do parse defaultlanguage from asterisk.conf Do parse the option "defaultlanguage" from the [options] section of asterisk.conf, as in the sample config file. Otherwise the build-time default language (normally "en") is always the default one. Review: https://reviewboard.asterisk.org/r/1342/ Signed-off-by: Tzafrir Cohen (License #5035) Original-Commit: http://svn.digium.com/svn/asterisk/branches/1.8@335716 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@335717 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/asterisk.c b/main/asterisk.c index 748379a2af..16f3efa0e9 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3055,6 +3055,8 @@ static void ast_readconfig(void) } } else if (!strcasecmp(v->name, "languageprefix")) { ast_language_is_prefix = ast_true(v->value); + } else if (!strcasecmp(v->name, "defaultlanguage")) { + ast_copy_string(defaultlanguage, v->value, MAX_LANGUAGE); } else if (!strcasecmp(v->name, "lockmode")) { if (!strcasecmp(v->value, "lockfile")) { ast_set_lock_type(AST_LOCK_TYPE_LOCKFILE);