[asterisk-commits] tilghman: branch 1.2 r75748 - /branches/1.2/apps/app_voicemail.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 18 15:31:37 CDT 2007
Author: tilghman
Date: Wed Jul 18 15:31:36 2007
New Revision: 75748
URL: http://svn.digium.com/view/asterisk?view=rev&rev=75748
Log:
Store prior to copy (closes issue #10193)
Modified:
branches/1.2/apps/app_voicemail.c
Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?view=diff&rev=75748&r1=75747&r2=75748
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Wed Jul 18 15:31:36 2007
@@ -2691,6 +2691,13 @@
ast_unlock_path(dir);
+ /* We must store the file first, before copying the message, because
+ * ODBC storage does the entire copy with SQL.
+ */
+ if (ast_fileexists(fn, NULL, NULL) > 0) {
+ STORE(dir, vmu->mailbox, vmu->context, msgnum);
+ }
+
/* Are there to be more recipients of this message? */
while (tmpptr) {
struct ast_vm_user recipu, *recip;
@@ -2707,8 +2714,9 @@
free_user(recip);
}
}
+
+ /* Notification and disposal needs to happen after the copy, though. */
if (ast_fileexists(fn, NULL, NULL) > 0) {
- STORE(dir, vmu->mailbox, vmu->context, msgnum);
notify_new_message(chan, vmu, msgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
DISPOSE(dir, msgnum);
}
More information about the asterisk-commits
mailing list