FS-11184: [core] fix build errors

This commit is contained in:
Mike Jerris 2019-02-12 11:52:12 -05:00
parent f1d56a934b
commit 1c63aceba5
1 changed files with 4 additions and 3 deletions

View File

@ -3274,11 +3274,12 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_language(switch_xml_t *root, s
switch_status_t status;
if ((status = switch_xml_locate_language_ex(root, node, params, language, phrases, macros, str_language)) != SWITCH_STATUS_SUCCESS) {
const char *str_language_dup = strdup(str_language);
char *str_language_dup = strdup(str_language);
char *secondary;
if ((secondary=strchr(str_language_dup, '-')) != NULL) {
if ((secondary = strchr(str_language_dup, '-'))) {
*secondary++ = '\0';
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "language %s not found. trying %s by removing %s\n", str_language, str_language_dup, secondary);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"language %s not found. trying %s by removing %s\n", str_language, str_language_dup, secondary);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "lang", str_language_dup);
status = switch_xml_locate_language_ex(root, node, params, language, phrases, macros, str_language_dup);
}