]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Wed, 18 Jul 2007 21:29:47 +0000 (21:29 +0000)
committerAutomerge Script <automerge@asterisk.org>
Wed, 18 Jul 2007 21:29:47 +0000 (21:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@75797 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
channels/chan_iax2.c

index b292eb2fbbd761c8a209051fdc4c8e12df9ff1fa..5b31f41e606d0e06c0ad68674f3ee5ed3fa69574 100644 (file)
@@ -2691,6 +2691,13 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
 
                                        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 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
                                                        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);
                                        }
index dacc20e17c78b4bc924175340c88614e5a18e94a..ad120dbdcf80a0d7c89173ed6ab747ddf1ebb596 100644 (file)
@@ -6033,7 +6033,7 @@ static void vnak_retransmit(int callno, int last)
        while(f) {
                /* Send a copy immediately */
                if ((f->callno == callno) && iaxs[f->callno] &&
-                       (f->oseqno >= last)) {
+                       ((unsigned char ) (f->oseqno - last) < 128)) {
                        send_packet(f);
                }
                f = f->next;