[Asterisk-cvs] asterisk/apps app_voicemail.c,1.120,1.121

malcolmd at lists.digium.com malcolmd at lists.digium.com
Wed Jun 30 14:03:51 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv25871/apps

Modified Files:
	app_voicemail.c 
Log Message:
Bug # 1957. No more sending e-mails if the address isn't 
present.


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- app_voicemail.c	29 Jun 2004 13:12:18 -0000	1.120
+++ app_voicemail.c	30 Jun 2004 17:49:42 -0000	1.121
@@ -834,6 +834,11 @@
 	struct tm tm;
 	struct vm_zone *the_zone = NULL;
 
+	if (vmu && (strchr(vmu->email, '@') == NULL)) {
+		ast_log(LOG_WARNING, "Invalid e-mail address %s.  E-mail will not be sent.\n", vmu->email);
+		return(0);
+	}
+
 	if (!strcmp(format, "wav49"))
 		format = "WAV";
 	ast_log(LOG_DEBUG, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, attach_voicemail);




More information about the svn-commits mailing list