From 870f98f02de56e35b87f511544a6cda3d4d8fe69 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Sat, 3 Dec 2005 19:25:33 +0000 Subject: 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 --- apps/app_meetme.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apps/app_meetme.c') diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 3c9bad6f1..fb5f660ea 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -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; -- cgit v1.2.3