summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-06-18 13:57:33 +0000
committerJoshua Colp <jcolp@digium.com>2007-06-18 13:57:33 +0000
commit981a94f023f627965f3e6c659c3e33c220b69970 (patch)
treeaa8fc4d251ee213ed82050bc23be0365cf0203d6 /channels
parent883b38074429a48a26fe87be7d60a93def291ae8 (diff)
Merged revisions 69625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r69625 | file | 2007-06-18 09:55:00 -0400 (Mon, 18 Jun 2007) | 2 lines Fix issue where it would be possible for the negotiated codecs to get set back to nothing. (issue #9992 reported by yehavi) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 42894d3bc..d5483cb30 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -17863,14 +17863,16 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc
memset(&p->tredirip, 0, sizeof(p->tredirip));
changed = 1;
}
- if (codecs && (p->redircodecs != codecs)) {
- p->redircodecs = codecs;
- changed = 1;
- }
- if ((p->capability & codecs) != p->capability) {
- p->jointcapability &= codecs;
- p->capability &= codecs;
- changed = 1;
+ if (codecs) {
+ if ((p->redircodecs != codecs)) {
+ p->redircodecs = codecs;
+ changed = 1;
+ }
+ if ((p->capability & codecs) != p->capability) {
+ p->jointcapability &= codecs;
+ p->capability &= codecs;
+ changed = 1;
+ }
}
if (changed && !ast_test_flag(&p->flags[0], SIP_GOTREFER)) {
if (chan->_state != AST_STATE_UP) { /* We are in early state */