[Asterisk-cvs] asterisk/channels chan_iax2.c,1.222,1.223
markster at lists.digium.com
markster at lists.digium.com
Sun Dec 19 13:30:13 CST 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv5408/channels
Modified Files:
chan_iax2.c
Log Message:
Make sure read/write format are setup properly.
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -d -r1.222 -r1.223
--- chan_iax2.c 11 Dec 2004 19:25:10 -0000 1.222
+++ chan_iax2.c 19 Dec 2004 18:26:12 -0000 1.223
@@ -2697,8 +2697,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;
@@ -6351,7 +6351,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;
@@ -6364,6 +6364,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