[svn-commits] mmichelson: branch mmichelson/imap_consistency r132937 - /team/mmichelson/ima...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 23 10:17:39 CDT 2008


Author: mmichelson
Date: Wed Jul 23 10:17:39 2008
New Revision: 132937

URL: http://svn.digium.com/view/asterisk?view=rev&rev=132937
Log:
Completely remove IMAP-specific code from the advanced_options
function. It is no longer necessary.


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=132937&r1=132936&r2=132937
==============================================================================
--- team/mmichelson/imap_consistency/apps/app_voicemail.c (original)
+++ team/mmichelson/imap_consistency/apps/app_voicemail.c Wed Jul 23 10:17:39 2008
@@ -8535,10 +8535,6 @@
 static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int msg, int option, signed char record_gain)
 {
 	int res = 0;
-#ifdef IMAP_STORAGE
-	char origtimeS[256],cidS[256],contextS[256];
-	char *header_content,*temp;
-#endif
 	char filename[PATH_MAX];
 	struct ast_config *msg_cfg = NULL;
 	const char *origtime, *context;
@@ -8546,56 +8542,9 @@
 	int retries = 0;
 
 	vms->starting = 0; 
-#ifdef IMAP_STORAGE
-	/* START HERE */
-	/* get the message info!! */
-	if (option_debug > 2)
-		ast_log (LOG_DEBUG,"Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n",vms->curmsg, vms->msgArray[vms->curmsg]);
-	if (vms->msgArray[vms->curmsg] == 0) {
-		ast_log (LOG_WARNING,"Trying to access unknown message\n");
-		return -1;
-	}
-
-	/* This will only work for new messages... */
-	header_content = mail_fetchheader (vms->mailstream, vms->msgArray[vms->curmsg]);
-	/* empty string means no valid header */
-	if (ast_strlen_zero(header_content)) {
-		ast_log (LOG_ERROR,"Could not fetch header for message number %ld\n",vms->msgArray[vms->curmsg]);
-		return -1;
-	}
-
-	/* Get info from headers!! */
-	temp = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Num:");
-	
-	if (temp)
-		ast_copy_string(cidS,temp, sizeof(cidS));
-	else
-		cidS[0] = '\0';
-	
-	cid = &cidS[0];
-	temp = get_header_by_tag(header_content, "X-Asterisk-VM-Context:");
-	
-	if (temp)
-		ast_copy_string(contextS,temp, sizeof(contextS));
-	else
-		contextS[0] = '\0';
-	
-	context = &contextS[0];
-	temp = get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:");
-	
-	if (temp)
-		ast_copy_string(origtimeS,temp, sizeof(origtimeS));
-	else
-		origtimeS[0] = '\0';
-	
-	origtime = &origtimeS[0];
-	
-	ast_copy_string(filename, "IMAP_STORAGE", sizeof(filename));
-#else
 	make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);
 
 	/* Retrieve info from VM attribute file */
-
 	make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
 	snprintf(filename,sizeof(filename), "%s.txt", vms->fn2);
 	RETRIEVE(vms->curdir, vms->curmsg, vmu);
@@ -8616,7 +8565,6 @@
 	context = ast_variable_retrieve(msg_cfg, "message", "context");
 	if (!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */
 		context = ast_variable_retrieve(msg_cfg, "message","macrocontext");
-#endif
 	switch (option) {
 	case 3:
 		if (!res)
@@ -8979,9 +8927,6 @@
 	return cmd;
 }
 
-#ifdef IMAP_STORAGE
-#endif /* IMAP_STORAGE */
-
 /* This is a workaround so that menuselect displays a proper description
  * AST_MODULE_INFO(, , "Comedian Mail (Voicemail System)"
  */




More information about the svn-commits mailing list