aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-18 21:29:47 +0000
committerautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-18 21:29:47 +0000
commit19e61361af12cf0d24b1aed594fce6343a7b0296 (patch)
tree4063fd84ae5e1dda483d92cbfa24a771b256870d
parentcca87225dfbd695cd64510944fa91e65808c3023 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@75797 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_voicemail.c10
-rw-r--r--channels/chan_iax2.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index b292eb2fb..5b31f41e6 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -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);
}
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index dacc20e17..ad120dbdc 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -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;