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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 21 14:01:11 CST 2007


Author: mmichelson
Date: Fri Dec 21 14:01:10 2007
New Revision: 94539

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

........
r94538 | mmichelson | 2007-12-21 13:59:45 -0600 (Fri, 21 Dec 2007) | 5 lines

The mail_copy c-client function does not expect a full imap mailbox string, just the name of the mailbox.

(closes issue #11419, reported and patched by jaroth, with additional patchwork from me)


........

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=94539&r1=94538&r2=94539
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Dec 21 14:01:10 2007
@@ -2753,7 +2753,6 @@
 
 static int copy_message(struct ast_channel *chan, struct ast_vm_user *vmu, int imbox, int msgnum, long duration, struct ast_vm_user *recip, char *fmt, char *dir)
 {
-	char dest[256];
 	struct vm_state *sendvms = NULL, *destvms = NULL;
 	char messagestring[10]; /*I guess this could be a problem if someone has more than 999999999 messages...*/
 	if(!(sendvms = get_vm_state_by_imapuser(vmu->imapuser, 2)))
@@ -2766,9 +2765,8 @@
 		ast_log(LOG_ERROR, "Couldn't get vm_state for destination mailbox!\n");
 		return -1;
 	}
-	imap_mailbox_name(dest, sizeof(dest), destvms, imbox, 1);
 	snprintf(messagestring, sizeof(messagestring), "%ld", sendvms->msgArray[msgnum]);
-	if((mail_copy(sendvms->mailstream, messagestring, dest) == T))
+	if((mail_copy(sendvms->mailstream, messagestring, (char *) mbox(imbox)) == T))
 		return 0;
 	ast_log(LOG_WARNING, "Unable to copy message from mailbox %s to mailbox %s\n", vmu->mailbox, recip->mailbox);
 	return -1;
@@ -3422,7 +3420,6 @@
 #ifdef IMAP_STORAGE
 	/* we must use mbox(x) folder names, and copy the message there */
 	/* simple. huh? */
-	char dbox[256];
 	long res;
 	char sequence[10];
 
@@ -3430,9 +3427,8 @@
 	if (box == 1) return 10;
 	/* get the real IMAP message number for this message */
 	snprintf(sequence, sizeof(sequence), "%ld", vms->msgArray[msg]);
-	imap_mailbox_name(dbox, sizeof(dbox), vms, box, 1);
 	ast_debug(3, "Copying sequence %s to mailbox %s\n",sequence,dbox);
-	res = mail_copy(vms->mailstream, sequence, dbox);
+	res = mail_copy(vms->mailstream,sequence,(char *) mbox(box));
 	if (res == 1) return 0;
 	return 1;
 #else




More information about the asterisk-commits mailing list