aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-18 13:55:00 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-18 13:55:00 +0000
commit19451a4836f714d75b34dd0353e0d1ed950ec133 (patch)
tree5c0c8265ff0cc0ff16010a39e68780cfe001b350 /channels
parenta1b09a6c5604e678ad53f630d3a498a84636235b (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@69625 f38db490-d61c-443f-a65b-d21fe96a405b
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 6a61a018a..362976e65 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -17085,14 +17085,16 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struc
memset(&p->vredirip, 0, sizeof(p->vredirip));
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 */