[asterisk-commits] mmichelson: branch mmichelson/imap_consistency r129740 - /team/mmichelson/ima...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 10 16:17:02 CDT 2008


Author: mmichelson
Date: Thu Jul 10 16:17:01 2008
New Revision: 129740

URL: http://svn.digium.com/view/asterisk?view=rev&rev=129740
Log:
Removed the todir variable from imap_retrieve file. Cleaned up
the text file generation.


Modified:
    team/mmichelson/imap_consistency/apps/app_voicemail.c

Modified: team/mmichelson/imap_consistency/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/imap_consistency/apps/app_voicemail.c?view=diff&rev=129740&r1=129739&r2=129740
==============================================================================
--- team/mmichelson/imap_consistency/apps/app_voicemail.c (original)
+++ team/mmichelson/imap_consistency/apps/app_voicemail.c Thu Jul 10 16:17:01 2008
@@ -1652,7 +1652,6 @@
 
 	BODY *body;
 	char *header_content;
-	char todir[PATH_MAX];
 	char *attachedfilefmt;
 	const char *cid_num;
 	const char *duration;
@@ -1691,8 +1690,7 @@
 		ast_log (LOG_ERROR,"Could not fetch header for message number %ld\n",vms->msgArray[msgnum]);
 		return -1;
 	}
-	snprintf(todir, sizeof(todir), "%s%s/%s/tmp", VM_SPOOL_DIR, vmu->context, vmu->mailbox);
-	make_file(vms->fn, sizeof(vms->fn), todir, msgnum);
+	make_file(vms->fn, sizeof(vms->fn), dir, msgnum);
 
 	mail_fetchstructure (vms->mailstream,vms->msgArray[msgnum],&body);
 	
@@ -1715,8 +1713,7 @@
 	save_body(body, vms, "2", attachedfilefmt);
 
 	/* Get info from headers!! */
-	make_file(text_file, sizeof(text_file), dir, msgnum);
-	snprintf(text_file, sizeof(text_file), "%s.%s", text_file, "txt");
+	snprintf(text_file, sizeof(text_file), "%s.%s", vms->fn, "txt");
 
 	if (!(text_file_ptr = fopen(text_file, "w"))) {
 		ast_log(LOG_WARNING, "Unable to open/create file %s: %s\n", text_file, strerror(errno));




More information about the asterisk-commits mailing list