dect
/
asterisk
Archived
13
0
Fork 0

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)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57875 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
file 2007-03-05 18:46:59 +00:00
parent fa686bfc12
commit f4a4b7057f
1 changed files with 16 additions and 17 deletions

View File

@ -766,18 +766,6 @@ static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin
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 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
}
}
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);