apply patch from MODAPP-156

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10199 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-10-30 00:52:11 +00:00
parent 0a5a51723d
commit 7afabe3c23

View File

@ -245,11 +245,14 @@ static abyss_bool http_directory_auth(TSession * r, char *domain_name)
} }
} }
if (!(mypass1 && mypass2)) { if (!switch_strlen_zero(mypass2) && !strcasecmp(mypass2, "user-choose")) {
mypass2 = NULL;
}
if (!mypass1) {
r->requestInfo.user = strdup(user); r->requestInfo.user = strdup(user);
goto authed; goto authed;
} else { } else {
if (mypass1) {
if (at) { if (at) {
switch_snprintf(z, sizeof(z), "%s@%s:%s", user, domain_name, mypass1); switch_snprintf(z, sizeof(z), "%s@%s:%s", user, domain_name, mypass1);
} else { } else {
@ -261,7 +264,6 @@ static abyss_bool http_directory_auth(TSession * r, char *domain_name)
r->requestInfo.user = strdup(box ? box : user); r->requestInfo.user = strdup(box ? box : user);
goto authed; goto authed;
} }
}
if (mypass2) { if (mypass2) {
if (at) { if (at) {
@ -278,7 +280,6 @@ static abyss_bool http_directory_auth(TSession * r, char *domain_name)
} }
if (box) { if (box) {
if (mypass1) {
if (at) { if (at) {
switch_snprintf(z, sizeof(z), "%s@%s:%s", box, domain_name, mypass1); switch_snprintf(z, sizeof(z), "%s@%s:%s", box, domain_name, mypass1);
} else { } else {
@ -290,7 +291,6 @@ static abyss_bool http_directory_auth(TSession * r, char *domain_name)
r->requestInfo.user = strdup(box); r->requestInfo.user = strdup(box);
goto authed; goto authed;
} }
}
if (mypass2) { if (mypass2) {
if (at) { if (at) {