[svn-commits] branch crichter/0.2.1 - r7389 in /team/crichter/0.2.1: ./ pbx.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Dec 8 02:54:50 CST 2005


Author: crichter
Date: Thu Dec  8 02:54:48 2005
New Revision: 7389

URL: http://svn.digium.com/view/asterisk?rev=7389&view=rev
Log:
Merged revisions 7382,7386 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7382 | kpfleming | 2005-12-07 21:46:55 +0100 (Mi, 07 Dez 2005) | 2 lines

ensure that hints are allowed to use global variable references

........
r7386 | kpfleming | 2005-12-08 02:05:43 +0100 (Do, 08 Dez 2005) | 2 lines

initialize the buffer before using it...

........

Modified:
    team/crichter/0.2.1/   (props changed)
    team/crichter/0.2.1/pbx.c

Propchange: team/crichter/0.2.1/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Dec  8 02:54:48 2005
@@ -1,1 +1,1 @@
-/branches/1.2:1-7381
+/branches/1.2:1-7388

Modified: team/crichter/0.2.1/pbx.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/pbx.c?rev=7389&r1=7388&r2=7389&view=diff
==============================================================================
--- team/crichter/0.2.1/pbx.c (original)
+++ team/crichter/0.2.1/pbx.c Thu Dec  8 02:54:48 2005
@@ -4652,6 +4652,16 @@
 	int res;
 	int length;
 	char *p;
+	char expand_buf[VAR_BUF_SIZE] = { 0, };
+
+	/* if we are adding a hint, and there are global variables, and the hint
+	   contains variable references, then expand them
+	*/
+	if ((priority == PRIORITY_HINT) && AST_LIST_FIRST(&globals) && strstr(application, "${")) {
+		pbx_substitute_variables_varshead(&globals, application, expand_buf, sizeof(expand_buf));
+		application = expand_buf;
+	}
+
 	length = sizeof(struct ast_exten);
 	length += strlen(extension) + 1;
 	length += strlen(application) + 1;



More information about the svn-commits mailing list