mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 14:44:17 +00:00
change xml_lookups to take an event as params instead of url string this will break your xml_curl scripts please update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7333 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
14ba0b9999
commit
1424b6c73b
16 files changed
+286
-103
No files matched your search
@@ -158,6 +158,7 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name)
|
||||
switch_xml_t x_domain, x_domain_root = NULL, x_user, x_params, x_param;
|
||||
const char *box;
|
||||
int at = 0;
|
||||
switch_event_t *params = NULL;
|
||||
|
||||
p = RequestHeaderValue(r, "authorization");
|
||||
|
||||
@@ -197,11 +198,17 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name)
|
||||
r->user=strdup(user);
|
||||
goto authed;
|
||||
}
|
||||
|
||||
switch_event_create(¶ms, SWITCH_EVENT_MESSAGE);
|
||||
switch_assert(params);
|
||||
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "mailbox", "check");
|
||||
|
||||
if (switch_xml_locate_user("id", user, domain_name, NULL, &x_domain_root, &x_domain, &x_user, "mailbox=check") != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_xml_locate_user("id", user, domain_name, NULL, &x_domain_root, &x_domain, &x_user, params) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_destroy(¶ms);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
switch_event_destroy(¶ms);
|
||||
box = switch_xml_attr_soft(x_user, "mailbox");
|
||||
|
||||
for (x_param = switch_xml_child(x_domain, "param"); x_param; x_param = x_param->next) {
|
||||
|
||||
Reference in new issue
Block a user