[Asterisk-cvs] asterisk/apps app_meetme.c,1.75,1.76

markster at lists.digium.com markster at lists.digium.com
Tue Feb 1 00:47:29 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv22210/apps

Modified Files:
	app_meetme.c 
Log Message:
Fix potential segfault (bug #3479)


Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- app_meetme.c	30 Jan 2005 03:07:21 -0000	1.75
+++ app_meetme.c	1 Feb 2005 06:48:50 -0000	1.76
@@ -755,7 +755,7 @@
 	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 @@
 		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 @@
 	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);




More information about the svn-commits mailing list