mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-05 11:51:52 +00:00
improve http support
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6413 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
+11
-4
@@ -1316,6 +1316,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(const char *user_name,
|
||||
} else {
|
||||
snprintf(params, sizeof(params), "user=%s&domain=%s&ip=%s",
|
||||
switch_str_nil(user_name), switch_str_nil(domain_name), switch_str_nil(ip));
|
||||
xtra_params = "";
|
||||
}
|
||||
if ((status = switch_xml_locate_domain(domain_name, params, root, domain)) != SWITCH_STATUS_SUCCESS) {
|
||||
return status;
|
||||
@@ -1328,11 +1329,17 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user(const char *user_name,
|
||||
}
|
||||
|
||||
if (user_name) {
|
||||
if (!(*user = switch_xml_find_child(*domain, "user", "id", user_name)) && strstr(xtra_params, "mailbox") &&
|
||||
!(*user = switch_xml_find_child(*domain, "user", "mailbox", user_name))) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
if (strstr(xtra_params, "mailbox")) {
|
||||
if ((*user = switch_xml_find_child(*domain, "user", "mailbox", user_name))) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
if ((*user = switch_xml_find_child(*domain, "user", "id", user_name))) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user