summaryrefslogtreecommitdiff
path: root/main/plc.c
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2018-03-20 11:16:52 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2018-03-20 11:16:52 -0500
commitf863f1f91bfcaa2b8a184a5edbfaf7b52930bdf8 (patch)
tree4688f591fecb7eb453c66c37d8b24d645be3f31b /main/plc.c
parent05ac34fe85d2a3b320143ef5dd69c28a3569b966 (diff)
parent5d097f82367f61bdae7d799c7815e69ba089d6d6 (diff)
Merge "channel.c: Allow generic plc then channel formats are equal"
Diffstat (limited to 'main/plc.c')
-rw-r--r--main/plc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/plc.c b/main/plc.c
index 847ce65b0..369d285a5 100644
--- a/main/plc.c
+++ b/main/plc.c
@@ -262,10 +262,19 @@ static int reload_module(void)
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
ast_set2_flag(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC);
+ } else if (!strcasecmp(var->name, "genericplc_on_equal_codecs")) {
+ ast_set2_flag(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
}
}
ast_config_destroy(cfg);
+ /*
+ * Force on_equal_codecs to false if generic_plc is false.
+ */
+ if (!ast_opt_generic_plc) {
+ ast_set2_flag(&ast_options, 0, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
+ }
+
return 0;
}