Fix VMAuthenticate application (bug #2775)
authorMark Spencer <markster@digium.com>
Thu, 4 Nov 2004 03:41:26 +0000 (03:41 +0000)
committerMark Spencer <markster@digium.com>
Thu, 4 Nov 2004 03:41:26 +0000 (03:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4159 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index cdfc57e..058feae 100755 (executable)
@@ -3412,10 +3412,11 @@ static int vm_execmain(struct ast_channel *chan, void *data)
                        skipuser++;
                else
                        valid = 0;
-
        }
 
-       res = vm_authenticate(chan, vms.username, sizeof(vms.username), &vmus, context, prefixstr, skipuser, maxlogins);
+       if (!valid) {
+               res = vm_authenticate(chan, vms.username, sizeof(vms.username), &vmus, context, prefixstr, skipuser, maxlogins);
+       }
 
        if (!res) {
                valid = 1;