Index: apps/app_voicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v retrieving revision 1.144 diff -u -r1.144 app_voicemail.c --- apps/app_voicemail.c 5 Sep 2004 18:31:50 -0000 1.144 +++ apps/app_voicemail.c 5 Sep 2004 20:15:05 -0000 @@ -3384,6 +3384,7 @@ char prefile[256]=""; char buf[256]; int bytes=0; + int len = 0; if (adsi_available(chan)) { @@ -3411,6 +3412,11 @@ cmd = play_record_review(chan,"vm-rec-name",prefile, maxgreet, fmtc, 0, vmu, &duration); break; case '4': + len = strlen(vmu->password); + if (len > 0 && vmu->password[len-1] == '-') { + cmd = play_and_wait(chan, "vm-no"); + break; + } newpassword[1] = '\0'; newpassword[0] = cmd = play_and_wait(chan,"vm-newpassword"); if (cmd < 0) @@ -3540,6 +3546,7 @@ char *context=NULL; int silentexit = 0; char cid[256]=""; + int len = 0; LOCAL_USER_ADD(u); memset(&vms, 0, sizeof(vms)); @@ -3633,7 +3640,11 @@ } if (!skipuser) vmu = find_user(&vmus, context, vms.username); - if (vmu && !strcmp(vmu->password, password)) + len = strlen(vmu->password); + if (len > 0 && vmu->password[len-1] == '-') { + len--; + } + if (vmu && !strncmp(vmu->password, password, len)) valid++; else { if (option_verbose > 2)