Make sure we don't close a mailbox if we didn't open one (bug #4800)
authorMark Spencer <markster@digium.com>
Mon, 1 Aug 2005 11:09:03 +0000 (11:09 +0000)
committerMark Spencer <markster@digium.com>
Mon, 1 Aug 2005 11:09:03 +0000 (11:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6250 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 8a1d20f..e91eb3c 100755 (executable)
@@ -4713,7 +4713,8 @@ static int vm_execmain(struct ast_channel *chan, void *data)
        char *options;
 
        LOCAL_USER_ADD(u);
-       memset(&vms, 0, sizeof(vms));   
+       memset(&vms, 0, sizeof(vms));
+       vms.lastmsg = -1;
        memset(&vmus, 0, sizeof(vmus));
        ast_copy_string(fmtc, vmfmts, sizeof(fmtc));
        if (chan->_state != AST_STATE_UP)