[asterisk-commits] tilghman: branch 1.4 r75749 - in /branches/1.4: ./ apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 18 15:40:18 CDT 2007


Author: tilghman
Date: Wed Jul 18 15:40:18 2007
New Revision: 75749

URL: http://svn.digium.com/view/asterisk?view=rev&rev=75749
Log:
Merged revisions 75748 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75748 | tilghman | 2007-07-18 15:31:36 -0500 (Wed, 18 Jul 2007) | 2 lines

Store prior to copy (closes issue #10193)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/apps/app_voicemail.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=75749&r1=75748&r2=75749
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Wed Jul 18 15:40:18 2007
@@ -3132,6 +3132,13 @@
 
 					ast_unlock_path(dir);
 #ifndef IMAP_STORAGE
+					/* 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, chan, vmu, fmt, duration, vms);
+					}
+
 					/* Are there to be more recipients of this message? */
 					while (tmpptr) {
 						struct ast_vm_user recipu, *recip;
@@ -3149,8 +3156,8 @@
 						}
 					}
 #endif
+					/* Notification and disposal needs to happen after the copy, though. */
 					if (ast_fileexists(fn, NULL, NULL)) {
-						STORE(dir, vmu->mailbox, vmu->context, msgnum, chan, vmu, fmt, duration, vms);
 						notify_new_message(chan, vmu, msgnum, duration, fmt, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL));
 						DISPOSE(dir, msgnum);
 					}




More information about the asterisk-commits mailing list