]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix incorrect size of zeroing (left over from when maxmsg was hardcoded at 100)
authorTilghman Lesher <tilghman@meg.abyt.es>
Sat, 25 Mar 2006 05:01:16 +0000 (05:01 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sat, 25 Mar 2006 05:01:16 +0000 (05:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14830 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 00b755cf61890a35ebe05d6ff4b8f1e401eb31e9..55a9c84568dd244dfd60d971b891c6adf7467df8 100644 (file)
@@ -3892,7 +3892,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
                return ERROR_LOCK_PATH;
        
        vms->curmsg = -1; 
-       for (x=0;x < vmu->maxmsg;x++) { 
+       for (x = 0; x < vmu->maxmsg; x++) { 
                if (!vms->deleted[x] && (strcasecmp(vms->curbox, "INBOX") || !vms->heard[x])) { 
                        /* Save this message.  It's not in INBOX or hasn't been heard */ 
                        make_file(vms->fn, sizeof(vms->fn), vms->curdir, x); 
@@ -3926,9 +3926,9 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
 
 done:
        if (vms->deleted)
-               memset(vms->deleted, 0, sizeof(vms->deleted)); 
+               memset(vms->deleted, 0, vmu->maxmsg * sizeof(int)); 
        if (vms->heard)
-               memset(vms->heard, 0, sizeof(vms->heard)); 
+               memset(vms->heard, 0, vmu->maxmsg * sizeof(int)); 
 
        return 0;
 }