fix domain param lookup

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11369 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-01-22 19:06:48 +00:00
parent a226a4f756
commit 6bc24b8c98
1 changed files with 16 additions and 13 deletions

View File

@ -148,7 +148,7 @@ static switch_status_t http_stream_write(switch_stream_handle_t *handle, const c
return ret ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
}
static abyss_bool http_directory_auth(TSession * r, char *domain_name)
static abyss_bool http_directory_auth(TSession *r, char *domain_name)
{
char *p;
char *x;
@ -219,7 +219,9 @@ static abyss_bool http_directory_auth(TSession * r, char *domain_name)
switch_event_destroy(&params);
box = switch_xml_attr_soft(x_user, "mailbox");
for (x_param = switch_xml_child(x_domain, "param"); x_param; x_param = x_param->next) {
if ((x_params = switch_xml_child(x_domain, "params"))) {
for (x_param = switch_xml_child(x_params, "param"); x_param; x_param = x_param->next) {
const char *var = switch_xml_attr_soft(x_param, "name");
const char *val = switch_xml_attr_soft(x_param, "value");
@ -231,6 +233,7 @@ static abyss_bool http_directory_auth(TSession * r, char *domain_name)
ResponseAddField(r, (char *) var, (char *) val);
}
}
}
if (!(x_params = switch_xml_child(x_user, "params"))) {
r->requestInfo.user = strdup(user);