diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-07-18 20:43:54 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-07-18 20:43:54 +0000 |
commit | 5f39ac2b03d0ec18e52a78afeb55a6306dfd1d0f (patch) | |
tree | 6d6d52910f7d4052b3030f0b1e96316bf76ce0cc /apps | |
parent | 89acafbf37690b85baedf19d33fe4a99781b4e64 (diff) |
Merged revisions 75749 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75749 | tilghman | 2007-07-18 15:40:18 -0500 (Wed, 18 Jul 2007) | 10 lines
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)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 4c051dc8b..9c2e81b8e 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3341,6 +3341,13 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_ ast_update_realtime("voicemail_data", "id", tmpid, "filename", fn, "duration", tmpdur, NULL); } #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; @@ -3358,8 +3365,8 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_ } } #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); } |