More read/write lock fixes in various modules
authorJames Golovich <james@gnuinter.net>
Sat, 27 Mar 2004 07:41:33 +0000 (07:41 +0000)
committerJames Golovich <james@gnuinter.net>
Sat, 27 Mar 2004 07:41:33 +0000 (07:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2574 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_rpt.c
channels/chan_h323.c
channels/chan_iax.c
channels/chan_mgcp.c

index c99a06a..9e9d26f 100755 (executable)
@@ -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)";
index afecf0f..68a1837 100755 (executable)
@@ -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 */
index 2829c29..e85d348 100755 (executable)
@@ -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);
index 3755159..b06f020 100755 (executable)
@@ -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);