patch from MODAPP-156 with mods

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10137 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-10-24 00:28:10 +00:00
parent 42dd42ebb6
commit ac2728183c
1 changed files with 17 additions and 6 deletions

View File

@ -1983,22 +1983,33 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
thehash = val;
} else if (!strcasecmp(var, "vm-a1-hash")) {
vmhash = val;
} else if (!strcasecmp(var, "password")) {
thepass = val;
} else if (!strcasecmp(var, "vm-password")) {
} else if (!auth && !thepass && !strcasecmp(var, "password")) {
thepass = val;
} else if (!auth && !strcasecmp(var, "vm-password")) {
if (!switch_strlen_zero(val) && !strcasecmp(val, "user-choose")) {
if (switch_strlen_zero(cbt.password)) {
auth = 1;
} else {
thepass = val;
}
} else {
thepass = val;
}
} else if (!strcasecmp(var, "vm-mailto")) {
vm_email = switch_core_session_strdup(session, val);
} else if (!strcasecmp(var, "storage-dir")) {
vm_storage_dir = switch_core_session_strdup(session, val);
} else if (!switch_strlen_zero(cbt.password) && !thepass) {
thepass = cbt.password;
}
}
}
if (vmhash) {
thehash = vmhash;
}
if (!auth && !thepass && !switch_strlen_zero(cbt.password)) {
thepass = cbt.password;
}
if (!auth) {
if (!switch_strlen_zero(cbt.password) && !strcmp(cbt.password, mypass)) {