[Asterisk-cvs] asterisk/channels chan_iax2.c,1.188.2.7,1.188.2.8
russell at lists.digium.com
russell at lists.digium.com
Tue Dec 21 15:19:39 CST 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv19676/channels
Modified Files:
Tag: v1-0
chan_iax2.c
Log Message:
Make sure that read/write format are set up correctly
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.188.2.7
retrieving revision 1.188.2.8
diff -u -d -r1.188.2.7 -r1.188.2.8
--- chan_iax2.c 3 Dec 2004 23:35:36 -0000 1.188.2.7
+++ chan_iax2.c 21 Dec 2004 20:15:29 -0000 1.188.2.8
@@ -2711,8 +2711,8 @@
tmp->type = type;
/* We can support any format by default, until we get restricted */
tmp->nativeformats = capability;
- tmp->readformat = 0;
- tmp->writeformat = 0;
+ tmp->readformat = ast_best_codec(capability);
+ tmp->writeformat = ast_best_codec(capability);
tmp->pvt->pvt = CALLNO_TO_PTR(i->callno);
tmp->pvt->send_digit = iax2_digit;
tmp->pvt->send_text = iax2_sendtext;
@@ -6270,7 +6270,7 @@
ast_mutex_unlock(&iaxsl[callno]);
if (c) {
/* Choose a format we can live with */
- if (c->nativeformats & format)
+ if (c->nativeformats & format)
c->nativeformats &= format;
else {
native = c->nativeformats;
@@ -6283,6 +6283,8 @@
}
c->nativeformats = native;
}
+ c->readformat = ast_best_codec(c->nativeformats);
+ c->writeformat = c->readformat;
}
return c;
}
More information about the svn-commits
mailing list