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

@@ -143,8 +143,8 @@ static struct ast_conference {
int locked; /* Is the conference locked? */
pthread_t recordthread; /* thread for recording */
pthread_attr_t attr; /* thread attribute */
char *recordingfilename; /* Filename to record the Conference into */
char *recordingformat; /* Format to record the Conference in */
const char *recordingfilename; /* Filename to record the Conference into */
const char *recordingformat; /* Format to record the Conference in */
char pin[AST_MAX_EXTENSION]; /* If protected by a PIN */
char pinadmin[AST_MAX_EXTENSION]; /* If protected by a admin PIN */
struct ast_conference *next;
@@ -813,8 +813,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
int duration=20;
struct ast_dsp *dsp=NULL;
struct ast_app *app;
char *agifile;
char *agifiledefault = "conf-background.agi";
const char *agifile;
const char *agifiledefault = "conf-background.agi";
char meetmesecs[30] = "";
char exitcontext[AST_MAX_CONTEXT] = "";
char recordingtmp[AST_MAX_EXTENSION] = "";
@@ -1086,7 +1086,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
/* Find a pointer to the agi app and execute the script */
app = pbx_findapp("agi");
if (app) {
ret = pbx_exec(chan, app, agifile, 1);
char *s = ast_strdupa(agifile);
ret = pbx_exec(chan, app, s, 1);
} else {
ast_log(LOG_WARNING, "Could not find application (agi)\n");
ret = -2;