[svn-commits] russell: trunk r67806 - /trunk/apps/app_voicemail.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jun 6 12:40:05 MST 2007


Author: russell
Date: Wed Jun  6 14:40:04 2007
New Revision: 67806

URL: http://svn.digium.com/view/asterisk?view=rev&rev=67806
Log:
Don't try to check the result of alloca ...
... testing mantis/svn stuff ...
(issue #9828)

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=67806&r1=67805&r2=67806
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Wed Jun  6 14:40:04 2007
@@ -2218,14 +2218,12 @@
 		struct ast_channel *ast;
 		if ((ast = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, "", "", "", 0, 0))) {
 			char *passdata;
-			int vmlen = strlen(pagerbody)*3 + 200;
-			if ((passdata = alloca(vmlen))) {
-				memset(passdata, 0, vmlen);
-				prep_email_sub_vars(ast, vmu, msgnum + 1, context, mailbox, cidnum, cidname, dur, date, passdata, vmlen, category);
-				pbx_substitute_variables_helper(ast, pagerbody, passdata, vmlen);
-				fprintf(p, "%s\n", passdata);
-			} else
-				ast_log(LOG_WARNING, "Cannot allocate workspace for variable substitution\n");
+			int vmlen = strlen(pagerbody) * 3 + 200;
+			passdata = alloca(vmlen);
+			memset(passdata, 0, vmlen);
+			prep_email_sub_vars(ast, vmu, msgnum + 1, context, mailbox, cidnum, cidname, dur, date, passdata, vmlen, category);
+			pbx_substitute_variables_helper(ast, pagerbody, passdata, vmlen);
+			fprintf(p, "%s\n", passdata);
 			ast_channel_free(ast);
 		} else
 			ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");



More information about the svn-commits mailing list