[asterisk-commits] file: branch 13 r429407 - /branches/13/res/res_pjsip_session.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 12 06:31:32 CST 2014
Author: file
Date: Fri Dec 12 06:31:20 2014
New Revision: 429407
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429407
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/
Modified:
branches/13/res/res_pjsip_session.c
Modified: branches/13/res/res_pjsip_session.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip_session.c?view=diff&rev=429407&r1=429406&r2=429407
==============================================================================
--- branches/13/res/res_pjsip_session.c (original)
+++ branches/13/res/res_pjsip_session.c Fri Dec 12 06:31:20 2014
@@ -2039,9 +2039,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;
More information about the asterisk-commits
mailing list