[asterisk-commits] mmichelson: branch jrothenberger/asterisk-urgent r106434 - /team/jrothenberge...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 6 15:11:06 CST 2008


Author: mmichelson
Date: Thu Mar  6 15:11:06 2008
New Revision: 106434

URL: http://svn.digium.com/view/asterisk?view=rev&rev=106434
Log:
I noticed that the urg_flag variable was being passed from vm_execmain without having been initialized. Then
when I looked closer, I realized that it never gets set in that function. This led me to realize that the variable
serves no purpose, so it could be removed. This then led to the realization that the flag2 variable in forward_message
was also useless, so it too has been removed.

Modified:
    team/jrothenberger/asterisk-urgent/apps/app_voicemail.c

Modified: team/jrothenberger/asterisk-urgent/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_voicemail.c?view=diff&rev=106434&r1=106433&r2=106434
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_voicemail.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_voicemail.c Thu Mar  6 15:11:06 2008
@@ -4351,7 +4351,7 @@
 	return 0;
 }
 
-static int forward_message(struct ast_channel *chan, char *context, struct vm_state *vms, struct ast_vm_user *sender, char *fmt, int flag, signed char record_gain, char *flag2)
+static int forward_message(struct ast_channel *chan, char *context, struct vm_state *vms, struct ast_vm_user *sender, char *fmt, int flag, signed char record_gain)
 {
 #ifdef IMAP_STORAGE
 	BODY *body;
@@ -4586,8 +4586,8 @@
 					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, flag2);
-						run_externnotify(vmtmp->context, vmtmp->mailbox, flag2); 
+						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);
@@ -4597,10 +4597,10 @@
 					myserveremail = vmtmp->serveremail;
 				attach_user_voicemail = ast_test_flag(vmtmp, VM_ATTACH);
 				/* NULL category for IMAP storage */
-				sendmail(myserveremail, vmtmp, todircount, vmtmp->context, vmtmp->mailbox, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL), vms->fn, fmt, duration, attach_user_voicemail, chan, NULL, flag2);
+				sendmail(myserveremail, vmtmp, todircount, vmtmp->context, vmtmp->mailbox, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL), vms->fn, fmt, duration, attach_user_voicemail, chan, NULL, "");
 
 #else
-				copy_message(chan, sender, 0, curmsg, duration, vmtmp, fmt, dir, flag2);
+				copy_message(chan, sender, 0, curmsg, duration, vmtmp, fmt, dir, "");
 #endif
 				saved_messages++;
 				AST_LIST_REMOVE_CURRENT(list);
@@ -7099,7 +7099,6 @@
 	int play_auto = 0;
 	int play_folder = 0;
 	int in_urgent = 0;
-	char urg_flag[80];
 #ifdef IMAP_STORAGE
 	int deleted = 0;
 #endif
@@ -7413,7 +7412,7 @@
 
 				case '5': /* Leave VoiceMail */
 					if (ast_test_flag(vmu, VM_SVMAIL)) {
-						cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain, urg_flag);
+						cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain);
 						if (cmd == ERROR_LOCK_PATH) {
 							res = cmd;
 							ast_log(LOG_WARNING, "forward_message failed to lock path.\n");
@@ -7567,7 +7566,7 @@
 	
 		case '8': /* forward */
 			if (vms.lastmsg > -1) {
-				cmd = forward_message(chan, context, &vms, vmu, vmfmts, 0, record_gain, urg_flag);
+				cmd = forward_message(chan, context, &vms, vmu, vmfmts, 0, record_gain);
 				if (cmd == ERROR_LOCK_PATH) {
 					res = cmd;
 					goto out;




More information about the asterisk-commits mailing list