Bug 5858 - Make the chanvars.c functions return a 'const char *'

This should prevent us from unintentionally changing variable
values when they're returned from pbx_builtin_getvar_helper.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2005-12-03 19:25:33 +00:00
parent 6a6b88c0e3
commit 870f98f02d
27 changed files with 117 additions and 116 deletions

View File

@@ -1686,7 +1686,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
AST_APP_ARG(options);
AST_APP_ARG(extension);
);
char *tmpoptions = NULL;
const char *tmpoptions = NULL;
char *context = NULL;
int play_announcement = 1;
char agent_goodbye[AST_MAX_FILENAME_LEN];
@@ -2231,7 +2231,7 @@ static int agentmonitoroutgoing_exec(struct ast_channel *chan, void *data)
int nowarnings = 0;
int changeoutgoing = 0;
int res = 0;
char agent[AST_MAX_AGENT], *tmp;
char agent[AST_MAX_AGENT];
if (data) {
if (strchr(data, 'd'))
@@ -2242,6 +2242,7 @@ static int agentmonitoroutgoing_exec(struct ast_channel *chan, void *data)
changeoutgoing = 1;
}
if (chan->cid.cid_num) {
const char *tmp;
char agentvar[AST_MAX_BUF];
snprintf(agentvar, sizeof(agentvar), "%s_%s", GETAGENTBYCALLERID, chan->cid.cid_num);
if ((tmp = pbx_builtin_getvar_helper(NULL, agentvar))) {