From 6ce8fc0b15fbb7813a11eb6e6fab0d3debff688c Mon Sep 17 00:00:00 2001 From: James Golovich Date: Sat, 27 Mar 2004 07:41:33 +0000 Subject: More read/write lock fixes in various modules git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2574 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_rpt.c | 8 ++++---- channels/chan_h323.c | 4 ++-- channels/chan_iax.c | 6 +++--- channels/chan_mgcp.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/app_rpt.c b/apps/app_rpt.c index c99a06ae6..9e9d26f72 100755 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -378,8 +378,8 @@ pthread_attr_t attr; myrpt->rxchannel = ast_request(myrpt->rxchanname,AST_FORMAT_SLINEAR,tele); if (myrpt->rxchannel) { - ast_set_read_format(myrpt->rxchannel,AST_FORMAT_SLINEAR); - ast_set_write_format(myrpt->rxchannel,AST_FORMAT_SLINEAR); + ast_set_read_format(myrpt->rxchannel,AST_FORMAT_SLINEAR, 0); + ast_set_write_format(myrpt->rxchannel,AST_FORMAT_SLINEAR, 0); myrpt->rxchannel->whentohangup = 0; myrpt->rxchannel->appl = "Apprpt"; myrpt->rxchannel->data = "(Repeater Rx)"; @@ -405,8 +405,8 @@ pthread_attr_t attr; myrpt->txchannel = ast_request(myrpt->txchanname,AST_FORMAT_SLINEAR,tele); if (myrpt->txchannel) { - ast_set_read_format(myrpt->txchannel,AST_FORMAT_SLINEAR); - ast_set_write_format(myrpt->txchannel,AST_FORMAT_SLINEAR); + ast_set_read_format(myrpt->txchannel,AST_FORMAT_SLINEAR, 0); + ast_set_write_format(myrpt->txchannel,AST_FORMAT_SLINEAR, 0); myrpt->txchannel->whentohangup = 0; myrpt->txchannel->appl = "Apprpt"; myrpt->txchannel->data = "(Repeater Rx)"; diff --git a/channels/chan_h323.c b/channels/chan_h323.c index afecf0f3d..68a1837c5 100755 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -527,8 +527,8 @@ static struct ast_frame *oh323_rtp_read(struct oh323_pvt *p) if (f->subclass != p->owner->nativeformats) { ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass); p->owner->nativeformats = f->subclass; - ast_set_read_format(p->owner, p->owner->readformat); - ast_set_write_format(p->owner, p->owner->writeformat); + ast_set_read_format(p->owner, p->owner->readformat, 0); + ast_set_write_format(p->owner, p->owner->writeformat, 0); } /* Do in-band DTMF detection */ diff --git a/channels/chan_iax.c b/channels/chan_iax.c index 2829c2912..e85d34876 100755 --- a/channels/chan_iax.c +++ b/channels/chan_iax.c @@ -3798,7 +3798,7 @@ retryowner: orignative = iaxs[fr.callno]->owner->nativeformats; iaxs[fr.callno]->owner->nativeformats = f.subclass; if (iaxs[fr.callno]->owner->readformat) - ast_set_read_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->readformat); + ast_set_read_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->readformat, 0); iaxs[fr.callno]->owner->nativeformats = orignative; ast_mutex_unlock(&iaxs[fr.callno]->owner->lock); } @@ -3981,9 +3981,9 @@ retryowner: ast_verbose(VERBOSE_PREFIX_3 "Format for call is %s\n", ast_getformatname(iaxs[fr.callno]->owner->nativeformats)); /* Setup read/write formats properly. */ if (iaxs[fr.callno]->owner->writeformat) - ast_set_write_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->writeformat); + ast_set_write_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->writeformat, 0); if (iaxs[fr.callno]->owner->readformat) - ast_set_read_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->readformat); + ast_set_read_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->readformat, 0); } } ast_mutex_lock(&dpcache_lock); diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 375515914..b06f020d6 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1307,8 +1307,8 @@ static int rtpready(struct ast_rtp *rtp, struct ast_frame *f, void *data) if (f->subclass != p->owner->nativeformats) { ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass); p->owner->nativeformats = f->subclass; - ast_set_read_format(p->owner, p->owner->readformat); - ast_set_write_format(p->owner, p->owner->writeformat); + ast_set_read_format(p->owner, p->owner->readformat, 0); + ast_set_write_format(p->owner, p->owner->writeformat, 0); } if (p->dtmfinband) { f = ast_dsp_process(p->owner,p->dsp,f,0); -- cgit v1.2.3