[asterisk-commits] mmichelson: trunk r74477 - in /trunk: ./ apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 10 18:34:06 CDT 2007


Author: mmichelson
Date: Tue Jul 10 18:34:06 2007
New Revision: 74477

URL: http://svn.digium.com/view/asterisk?view=rev&rev=74477
Log:
Merged revisions 74476 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74476 | mmichelson | 2007-07-10 18:32:52 -0500 (Tue, 10 Jul 2007) | 5 lines

Forwarding a message with IMAP storage was storing the message in the sender's box instead of the forwarded mailbox.

(closes issue #10138, reported and patched by jaroth)


........

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=74477&r1=74476&r2=74477
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue Jul 10 18:34:06 2007
@@ -4176,6 +4176,7 @@
 	char *temp;
 	char todir[256];
 	int todircount=0;
+	struct vm_state *dstvms;
 #endif
 	char username[70]="";
 	int res = 0, cmd = 0;
@@ -4366,7 +4367,19 @@
  				/* should not assume "fmt" here! */
 				save_body(body,vms,"2",fmt);
  
-				STORE(todir, vmtmp->mailbox, vmtmp->context, vms->curmsg, chan, vmtmp, fmt, duration, vms);
+				/* get destination mailbox */
+				dstvms = get_vm_state_by_mailbox(vmtmp->mailbox,0);
+				if (dstvms) {
+					init_mailstream(dstvms, 0);
+					if (!dstvms->mailstream) {
+						ast_log (LOG_ERROR,"IMAP mailstream for %s is NULL\n",vmtmp->mailbox);
+					} else {
+						STORE(todir, vmtmp->mailbox, vmtmp->context, dstvms->curmsg, chan, vmtmp, fmt, duration, dstvms);
+						run_externnotify(vmtmp->context, vmtmp->mailbox); 
+					}
+				} else {
+					ast_log (LOG_ERROR,"Could not find state information for mailbox %s\n",vmtmp->mailbox);
+				}
 
 				if (!ast_strlen_zero(vmtmp->serveremail))
 					myserveremail = vmtmp->serveremail;




More information about the asterisk-commits mailing list