[asterisk-commits] file: trunk r57875 - in /trunk: ./ apps/app_meetme.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 5 11:47:00 MST 2007


Author: file
Date: Mon Mar  5 12:46:59 2007
New Revision: 57875

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57875
Log:
Merged revisions 57872 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r57872 | file | 2007-03-05 13:39:28 -0500 (Mon, 05 Mar 2007) | 2 lines

Don't create a listen channel and record the conference unless the option is turned on. (issue #9204 reported by francesco_r)

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_meetme.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=57875&r1=57874&r2=57875
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Mon Mar  5 12:46:59 2007
@@ -766,18 +766,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;
@@ -1402,11 +1390,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 asterisk-commits mailing list