From 1064bb043c9eee801437621d0e146bdffbe7fe53 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 13 Nov 2017 13:32:23 -0600 Subject: [PATCH] FS-10784: [freeswitch-core] Make Users lists compatible with all forms of xml #resolve --- src/switch_xml.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/switch_xml.c b/src/switch_xml.c index 4ef0e9ec6c..1dc8166eca 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -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: