Prepare for removal of DBGet/DBPut manager commands, by allowing Getvar to get functions (Setvar can already set functions)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2006-01-15 05:50:19 +00:00
parent 9702fac4f8
commit 417d6b1793

View File

@@ -745,7 +745,11 @@ static int action_getvar(struct mansession *s, struct message *m)
}
}
pbx_retrieve_variable(c, varname, &varval, workspace, sizeof(workspace), NULL);
if (varname[strlen(varname) - 1] == ')') {
varval = ast_func_read(c, varname, workspace, sizeof(workspace));
} else {
pbx_retrieve_variable(c, varname, &varval, workspace, sizeof(workspace), NULL);
}
if (c)
ast_mutex_unlock(&c->lock);