aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-06 05:15:29 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-06 05:15:29 +0000
commitd1d229de9706a08fdbec655fad062737f2c381d1 (patch)
tree02e121f71dc55f3ac52d97ed98c43328c7e2a7eb /apps
parent46273ba0f5f09f986ed094f212ae16b327dafa64 (diff)
Handle ODBC forwarding properly (bug #5606)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6974 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_voicemail.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 1ab7dceff..103bdfe5e 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1098,7 +1098,7 @@ static void copy_file(char *sdir, int smsg, char *ddir, int dmsg, char *dmailbox
{
int res;
SQLHSTMT stmt;
- char sql[256];
+ char sql[512];
char msgnums[20];
char msgnumd[20];
odbc_obj *obj;
@@ -3455,6 +3455,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
cmd = leave_voicemail(chan, username, &leave_options);
} else {
/* Forward VoiceMail */
+ RETRIEVE(dir, curmsg);
cmd = vm_forwardoptions(chan, sender, dir, curmsg, vmfmts, context, record_gain);
if (!cmd) {
while (!res && vmtmp) {
@@ -3485,6 +3486,8 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
ast_log(LOG_DEBUG, "%s", sys);
ast_safe_system(sys);
snprintf(fn, sizeof(fn), "%s/msg%04d", todir,todircount);
+
+ STORE(todir, vmtmp->mailbox, vmtmp->context, todircount);
/* load the information on the source message so we can send an e-mail like a new message */
snprintf(miffile, sizeof(miffile), "%s/msg%04d.txt", dir, curmsg);