[svn-commits] file: branch 1.4 r57872 - /branches/1.4/apps/app_meetme.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Mar 5 11:39:28 MST 2007


Author: file
Date: Mon Mar  5 12:39:28 2007
New Revision: 57872

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57872
Log:
Don't create a listen channel and record the conference unless the option is turned on. (issue #9204 reported by francesco_r)

Modified:
    branches/1.4/apps/app_meetme.c

Modified: branches/1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=57872&r1=57871&r2=57872
==============================================================================
--- branches/1.4/apps/app_meetme.c (original)
+++ branches/1.4/apps/app_meetme.c Mon Mar  5 12:39:28 2007
@@ -772,18 +772,6 @@
 		cnf = NULL;
 		goto cnfout;
 	}
-	cnf->lchan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
-	if (cnf->lchan) {
-		ast_set_read_format(cnf->lchan, AST_FORMAT_SLINEAR);
-		ast_set_write_format(cnf->lchan, AST_FORMAT_SLINEAR);
-		ztc.chan = 0;
-		ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
-		if (ioctl(cnf->lchan->fds[0], ZT_SETCONF, &ztc)) {
-			ast_log(LOG_WARNING, "Error setting conference\n");
-			ast_hangup(cnf->lchan);
-			cnf->lchan = NULL;
-		}
-	}
 	/* Fill the conference struct */
 	cnf->start = time(NULL);
 	cnf->zapconf = ztc.confno;
@@ -1404,11 +1392,22 @@
 		}
 	}
 
-	if ((conf->recording == MEETME_RECORD_OFF) && ((confflags & CONFFLAG_RECORDCONF) || (conf->lchan))) {
-		pthread_attr_init(&conf->attr);
-		pthread_attr_setdetachstate(&conf->attr, PTHREAD_CREATE_DETACHED);
-		ast_pthread_create_background(&conf->recordthread, &conf->attr, recordthread, conf);
-		pthread_attr_destroy(&conf->attr);
+	if ((conf->recording == MEETME_RECORD_OFF) && (confflags & CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL)))) {
+		ast_set_read_format(conf->lchan, AST_FORMAT_SLINEAR);
+		ast_set_write_format(conf->lchan, AST_FORMAT_SLINEAR);
+		ztc.chan = 0;
+		ztc.confno = conf->zapconf;
+		ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
+		if (ioctl(conf->lchan->fds[0], ZT_SETCONF, &ztc)) {
+			ast_log(LOG_WARNING, "Error starting listen channel\n");
+			ast_hangup(conf->lchan);
+			conf->lchan = NULL;
+		} else {
+			pthread_attr_init(&conf->attr);
+			pthread_attr_setdetachstate(&conf->attr, PTHREAD_CREATE_DETACHED);
+			ast_pthread_create_background(&conf->recordthread, &conf->attr, recordthread, conf);
+			pthread_attr_destroy(&conf->attr);
+		}
 	}
 
 	time(&user->jointime);



More information about the svn-commits mailing list