[asterisk-commits] twilson: trunk r114127 - /trunk/res/res_phoneprov.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 14 14:58:52 CDT 2008


Author: twilson
Date: Mon Apr 14 14:58:52 2008
New Revision: 114127

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114127
Log:
Need a new buffer for each loop

Modified:
    trunk/res/res_phoneprov.c

Modified: trunk/res/res_phoneprov.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_phoneprov.c?view=diff&rev=114127&r1=114126&r2=114127
==============================================================================
--- trunk/res/res_phoneprov.c (original)
+++ trunk/res/res_phoneprov.c Mon Apr 14 14:58:52 2008
@@ -1110,7 +1110,6 @@
 /*! \brief A dialplan function that can be used to output a template for each extension attached to a user */
 static int pp_each_extension_exec(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
-	char expand_buf[VAR_BUF_SIZE] = {0,};
 	struct user *user;
 	struct extension *exten;
 	char path[PATH_MAX];
@@ -1148,6 +1147,7 @@
 	}
 
 	AST_LIST_TRAVERSE(&user->extensions, exten, entry) {
+		char expand_buf[VAR_BUF_SIZE] = {0,};
 		pbx_substitute_variables_varshead(exten->headp, file, expand_buf, sizeof(expand_buf));
 		ast_build_string(&buf, &len, "%s", expand_buf);
 	}




More information about the asterisk-commits mailing list