[asterisk-commits] file: branch 1.4 r69625 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 18 08:55:01 CDT 2007


Author: file
Date: Mon Jun 18 08:55:00 2007
New Revision: 69625

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69625
Log:
Fix issue where it would be possible for the negotiated codecs to get set back to nothing. (issue #9992 reported by yehavi)

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=69625&r1=69624&r2=69625
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Jun 18 08:55:00 2007
@@ -17085,14 +17085,16 @@
 		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 */




More information about the asterisk-commits mailing list