Author: bebuild
Date: Fri Dec 19 15:47:38 2014
New Revision: 429890

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429890
Log:
res_pjsip_session: Fix issue where a declined media stream in a re-INVITE would 
fail SDP negotiation.

In the past the SDP negotiation within res_pjsip_session was made more tolerant 
of
certain situations. The only case where SDP negotiation will fail is when a 
major
error occurs during negotiation. Receiving an already declined media stream is
not considered a major error.

When producing the local SDP the logic took this into account so on the initial 
INVITE
the declined media stream did not cause an SDP negotiation failure. 
Unfortunately
the logic for handling media streams with a handler did not mirror this logic 
and
considered an already declined media stream an error and thus failed the SDP
negotiation.

This change makes the logic between both situations match so only under major
errors will the SDP negotiation fail.

ASTERISK-24607 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/4254/
........

Merged revisions 429407 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    certified/branches/13.1/   (props changed)
    certified/branches/13.1/res/res_pjsip_session.c

Propchange: certified/branches/13.1/
------------------------------------------------------------------------------
--- branch-13-merged (original)
+++ branch-13-merged Fri Dec 19 15:47:38 2014
@@ -1,1 +1,1 @@
-/branches/13:429175,429196,429409,429433,429477,429497,429540,429571,429739,429761,429829
+/branches/13:429175,429196,429407,429409,429433,429477,429497,429540,429571,429739,429761,429829

Modified: certified/branches/13.1/res/res_pjsip_session.c
URL: 
http://svnview.digium.com/svn/asterisk/certified/branches/13.1/res/res_pjsip_session.c?view=diff&rev=429890&r1=429889&r2=429890
==============================================================================
--- certified/branches/13.1/res/res_pjsip_session.c (original)
+++ certified/branches/13.1/res/res_pjsip_session.c Fri Dec 19 15:47:38 2014
@@ -2073,9 +2073,9 @@
        int res;
 
        if (handler) {
-               /* if an already assigned handler does not handle the 
session_media or reports a catastrophic error, fail */
+               /* if an already assigned handler reports a catastrophic error, 
fail */
                res = handler->create_outgoing_sdp_stream(session, 
session_media, answer);
-               if (res <= 0) {
+               if (res < 0) {
                        return 0;
                }
                return CMP_MATCH;


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to