[Freeswitch-svn] [commit] r10137 - freeswitch/trunk/src/mod/applications/mod_voicemail
Freeswitch SVN
anthm at freeswitch.org
Thu Oct 23 20:28:10 EDT 2008
Author: anthm
Date: Thu Oct 23 20:28:10 2008
New Revision: 10137
Modified:
freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
Log:
patch from MODAPP-156 with mods
Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c Thu Oct 23 20:28:10 2008
@@ -1983,22 +1983,33 @@
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)) {
More information about the Freeswitch-svn
mailing list