aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_meetme.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-01 06:48:50 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-01 06:48:50 +0000
commitfab3f8be7ec4f3365146f78f4822c27b549848ee (patch)
treeaf5b3bff538a3378a2e5e828f4b0f00a376529bf /apps/app_meetme.c
parent37f1b05c635f565b7c85865e41ae53c0b2d5f9b8 (diff)
Fix potential segfault (bug #3479)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4942 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rwxr-xr-xapps/app_meetme.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index a5c81b62f..6f003f7af 100755
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -755,7 +755,7 @@ zapretry:
ztc.confno = conf->zapconf;
ast_mutex_lock(&conflock);
if (!(confflags & CONFFLAG_QUIET) && (confflags & CONFFLAG_INTROUSER) && conf->users > 1) {
- if (ast_fileexists(user->namerecloc, NULL, NULL)) {
+ if (conf->chan && ast_fileexists(user->namerecloc, NULL, NULL)) {
if (!ast_streamfile(conf->chan, user->namerecloc, chan->language))
ast_waitstream(conf->chan, "");
if (!ast_streamfile(conf->chan, "conf-hasjoin", chan->language))
@@ -1109,7 +1109,7 @@ zapretry:
conf_play(conf, LEAVE);
if (!(confflags & CONFFLAG_QUIET) && (confflags & CONFFLAG_INTROUSER) && conf->users > 1) {
- if (ast_fileexists(user->namerecloc, NULL, NULL)) {
+ if (conf->chan && ast_fileexists(user->namerecloc, NULL, NULL)) {
if (!ast_streamfile(conf->chan, user->namerecloc, chan->language))
ast_waitstream(conf->chan, "");
if (!ast_streamfile(conf->chan, "conf-hasleft", chan->language))
@@ -1719,6 +1719,9 @@ static void *recordthread(void *args)
int res=0;
cnf = (struct ast_conference *)args;
+ if( !cnf || !cnf->chan ) {
+ pthread_exit(0);
+ }
ast_stopstream(cnf->chan);
flags = O_CREAT|O_TRUNC|O_WRONLY;
s = ast_writefile(cnf->recordingfilename, cnf->recordingformat, NULL, flags, 0, 0644);