Merge "res_musiconhold: Avoid spurious warning when 'format' is the empty string" into 16

16.9
Joshua Colp 5 years ago committed by Gerrit Code Review
commit 1b3de98db5

@ -1119,7 +1119,7 @@ static void moh_parse_options(struct ast_variable *var, struct mohclass *mohclas
} else if (!strcasecmp(var->value, "randstart")) { } else if (!strcasecmp(var->value, "randstart")) {
ast_set_flag(mohclass, MOH_RANDSTART); ast_set_flag(mohclass, MOH_RANDSTART);
} }
} else if (!strcasecmp(var->name, "format")) { } else if (!strcasecmp(var->name, "format") && !ast_strlen_zero(var->value)) {
ao2_cleanup(mohclass->format); ao2_cleanup(mohclass->format);
mohclass->format = ast_format_cache_get(var->value); mohclass->format = ast_format_cache_get(var->value);
if (!mohclass->format) { if (!mohclass->format) {

Loading…
Cancel
Save