[Asterisk-code-review] res pjsip session: Check for removed stream state. (asterisk[15])
Richard Mudgett
asteriskteam at digium.com
Mon Sep 18 16:43:49 CDT 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/6464 )
Change subject: res_pjsip_session: Check for removed stream state.
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/6464/3/res/res_pjsip_session.c
File res/res_pjsip_session.c:
https://gerrit.asterisk.org/#/c/6464/3/res/res_pjsip_session.c@1468
PS3, Line 1468: if (ast_stream_get_state(stream) != AST_STREAM_STATE_REMOVED) {
: ast_format_cap_get_compatible(ast_stream_get_formats(stream), session->endpoint->media.codecs, joint_cap);
: }
This change will eliminate the crash. However, I think it puts a band-aid over a larger problem with how to deal with declined streams. I don't think aborting is the right behavior for a declined stream. A declined stream is a place holder in the stream vector.
An empty joint_cap should effectively decline the stream as well.
To change the purpose of a stream the old stream must go through a reinvite with SDP negotiating it as declined. Once both sides know that the old stream is gone then the position is available to be used for another purpose.
--
To view, visit https://gerrit.asterisk.org/6464
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic86f8b65a4a26a60885b28b8b1a0b22e1b471d42
Gerrit-Change-Number: 6464
Gerrit-PatchSet: 3
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Mon, 18 Sep 2017 21:43:49 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170918/7e9cea6e/attachment-0001.html>
More information about the asterisk-code-review
mailing list