mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +00:00
Fix incorrect size of zeroing (left over from when maxmsg was hardcoded at 100)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3892,7 +3892,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
|
|||||||
return ERROR_LOCK_PATH;
|
return ERROR_LOCK_PATH;
|
||||||
|
|
||||||
vms->curmsg = -1;
|
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])) {
|
if (!vms->deleted[x] && (strcasecmp(vms->curbox, "INBOX") || !vms->heard[x])) {
|
||||||
/* Save this message. It's not in INBOX or hasn't been heard */
|
/* Save this message. It's not in INBOX or hasn't been heard */
|
||||||
make_file(vms->fn, sizeof(vms->fn), vms->curdir, x);
|
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:
|
done:
|
||||||
if (vms->deleted)
|
if (vms->deleted)
|
||||||
memset(vms->deleted, 0, sizeof(vms->deleted));
|
memset(vms->deleted, 0, vmu->maxmsg * sizeof(int));
|
||||||
if (vms->heard)
|
if (vms->heard)
|
||||||
memset(vms->heard, 0, sizeof(vms->heard));
|
memset(vms->heard, 0, vmu->maxmsg * sizeof(int));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user