[Asterisk-cvs] asterisk/apps app_voicemail.c,1.266,1.267
kpfleming
kpfleming
Fri Nov 11 16:13:30 CST 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv17963/apps
Modified Files:
app_voicemail.c
Log Message:
issue #5663
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -d -r1.266 -r1.267
--- app_voicemail.c 11 Nov 2005 17:14:13 -0000 1.266
+++ app_voicemail.c 11 Nov 2005 21:04:10 -0000 1.267
@@ -3869,7 +3869,7 @@
static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
{
- int x;
+ int x, nummsg;
int res = 0;
if (vms->lastmsg <= -1)
@@ -3902,12 +3902,14 @@
}
}
}
- for (x = vms->curmsg + 1; x <= vmu->maxmsg; x++) {
- make_file(vms->fn, sizeof(vms->fn), vms->curdir, x);
- if (!EXISTS(vms->curdir, x, vms->fn, NULL))
- break;
- DELETE(vms->curdir, x, vms->fn);
- }
+
+ /* Delete ALL remaining messages */
+ nummsg = x;
+ for (x = vms->curmsg + 1; x <= nummsg; x++) {
+ make_file(vms->fn, sizeof(vms->fn), vms->curdir, x);
+ if (EXISTS(vms->curdir, x, vms->fn, NULL))
+ DELETE(vms->curdir, x, vms->fn);
+ }
ast_unlock_path(vms->curdir);
done:
More information about the svn-commits
mailing list