Fix AGI to know about "builtin" variables, too (bug #2737)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-12-23 02:47:01 +00:00
parent 55a24aecad
commit 3fde2e56b8
3 changed files with 9 additions and 6 deletions

6
pbx.c
View File

@@ -795,7 +795,7 @@ static struct ast_exten *pbx_find_extension(struct ast_channel *chan, struct ast
return NULL;
}
static void pbx_substitute_variables_temp(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp)
void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp)
{
char *first,*second;
char tmpvar[80] = "";
@@ -827,7 +827,7 @@ static void pbx_substitute_variables_temp(struct ast_channel *c, const char *var
if (!first)
first = tmpvar + strlen(tmpvar);
*first='\0';
pbx_substitute_variables_temp(c,tmpvar,ret,workspace,workspacelen - 1, headp);
pbx_retrieve_variable(c,tmpvar,ret,workspace,workspacelen - 1, headp);
if (!(*ret)) return;
offset=atoi(first+1);
if ((second=strchr(first+1,':'))) {
@@ -1103,7 +1103,7 @@ static void pbx_substitute_variables_helper_full(struct ast_channel *c, const ch
/* Retrieve variable value */
workspace[0] = '\0';
pbx_substitute_variables_temp(c,vars,&cp4, workspace, sizeof(workspace), headp);
pbx_retrieve_variable(c,vars,&cp4, workspace, sizeof(workspace), headp);
if (cp4) {
length = strlen(cp4);
if (length > count)