FS-10784: [freeswitch-core] Make Users lists compatible with all forms of xml #resolve

This commit is contained in:
Anthony Minessale 2017-11-13 13:32:23 -06:00 committed by Muteesa Fred
parent 8f1b7e066e
commit 1064bb043c
1 changed files with 11 additions and 1 deletions

View File

@ -1853,6 +1853,12 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user_in_domain(const char *use
}
}
}
} else {
if ((users = switch_xml_child(domain, "users"))) {
status = find_user_in_tag(users, NULL, user_name, "id", NULL, user);
} else {
status = find_user_in_tag(domain, NULL, user_name, "id", NULL, user);
}
}
return status;
@ -2145,7 +2151,11 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(const char *key,
}
if (status != SWITCH_STATUS_SUCCESS) {
status = find_user_in_tag(*domain, ip, user_name, key, params, user);
if ((users = switch_xml_child(*domain, "users"))) {
status = find_user_in_tag(users, ip, user_name, key, params, user);
} else {
status = find_user_in_tag(*domain, ip, user_name, key, params, user);
}
}
end: