diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-06-12 19:19:09 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-06-12 19:19:09 +0000 |
commit | cf06bdb312d36b73f38b82ffcb1c5cdab7033e46 (patch) | |
tree | 1f517282b7049748810c033d498a596827795636 /main/channel.c | |
parent | ff4fc97911e19432100dbe03760ae6d937a3747b (diff) |
Merged revisions 69010 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r69010 | russell | 2007-06-12 14:13:41 -0500 (Tue, 12 Jun 2007) | 12 lines
In ast_channel_make_compatible(), just return if the channels' read and write
formats already match up. There are code paths that call this function on a
pair of channels multiple times. This made calls fail that were using g729
in some cases. The reason is that codec_g729a will unregister itself from the
list of available translators will all licenses are in use. So, the first
time the function got called, the right translation path was allocated.
However, the second time it got called, the code would not find a translation
path to/from g729 and make the call fail, even if the channel actually already
had a g729 translation path allocated.
(SPD-32)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index 2ba4d3d10..dc99dfda9 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3244,6 +3244,11 @@ static int ast_channel_make_compatible_helper(struct ast_channel *from, struct a int src; int dst; + if (from->readformat == to->writeformat && from->writeformat == to->readformat) { + /* Already compatible! Moving on ... */ + return 0; + } + /* Set up translation from the 'from' channel to the 'to' channel */ src = from->nativeformats; dst = to->nativeformats; |