diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-10-02 04:54:13 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-10-02 04:54:13 +0000 |
commit | f1244fd3f8a2fa66c5261538e0d0ae827ef138d1 (patch) | |
tree | 6bcbae4ed9b2a58ba8e67dbbf04b53cb42c5e8d9 /apps | |
parent | c44527e18573dd7dec57a4d4142700e7ecd6d729 (diff) |
Merged revisions 289875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r289875 | tilghman | 2010-10-01 23:46:43 -0500 (Fri, 01 Oct 2010) | 22 lines
Merged revisions 289874 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r289874 | tilghman | 2010-10-01 23:45:49 -0500 (Fri, 01 Oct 2010) | 15 lines
Merged revisions 289873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r289873 | tilghman | 2010-10-01 23:42:08 -0500 (Fri, 01 Oct 2010) | 8 lines
When forwarding a message, a prepend means that the filesystem will always have a better copy.
(closes issue #17803)
Reported by: dpetersen
Patches:
20100923__issue17803.diff.txt uploaded by tilghman (license 14)
Tested by: dpetersen
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 46c3f4dc3..d60c58aac 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5173,18 +5173,12 @@ static int copy_message(struct ast_channel *chan, struct ast_vm_user *vmu, int i recipmsgnum = last_message_index(recip, todir) + 1; if (recipmsgnum < recip->maxmsg - (imbox ? 0 : inprocess_count(vmu->mailbox, vmu->context, 0))) { make_file(topath, sizeof(topath), todir, recipmsgnum); - if (EXISTS(fromdir, msgnum, frompath, chan->language)) { - COPY(fromdir, msgnum, todir, recipmsgnum, recip->mailbox, recip->context, frompath, topath); - } else { - /* For ODBC storage, if the file we want to copy isn't yet in the database, then the SQL - * copy will fail. Instead, we need to create a local copy, store it, and delete the local - * copy. We don't have to #ifdef this because if file storage reaches this point, there's a - * much worse problem happening and IMAP storage doesn't call this function - */ - copy_plain_file(frompath, topath); - STORE(todir, recip->mailbox, recip->context, recipmsgnum, chan, recip, fmt, duration, NULL, NULL); - vm_delete(topath); - } + /* If we are prepending a message for ODBC, then the message already + * exists in the database, but we want to force copying from the + * filesystem (since only the FS contains the prepend). */ + copy_plain_file(frompath, topath); + STORE(todir, recip->mailbox, recip->context, recipmsgnum, chan, recip, fmt, duration, NULL, NULL); + vm_delete(topath); } else { ast_log(AST_LOG_ERROR, "Recipient mailbox %s@%s is full\n", recip->mailbox, recip->context); res = -1; |