[Asterisk-code-review] res pjsip session: properly handle SDP from a forked call wi... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Mon Mar 5 07:37:01 CST 2018


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/8379 )

Change subject: res_pjsip_session: properly handle SDP from a forked call with early media
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/8379/1/res/res_pjsip_session.c
File res/res_pjsip_session.c:

https://gerrit.asterisk.org/#/c/8379/1/res/res_pjsip_session.c@895
PS1, Line 895: 		media_state = session->active_media_state;
I'm not comfortable with this because the subsequent code assumes that the media state is not immutable. When a media state is made active it becomes immutable, so that violates the contract. While it is possible to do this if it is not kept in mind in the future for future changes then crashes can occur.

I think instead of directly using active_media_state it should be cloned into pending_media_state using ast_sip_session_media_state_clone if pending_media_state is not present. This ensures that the contract remains.



-- 
To view, visit https://gerrit.asterisk.org/8379
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If0d5150ffe6f38d8a854831fef37942258d4629c
Gerrit-Change-Number: 8379
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: lvl <digium at lvlconsultancy.nl>
Gerrit-Comment-Date: Mon, 05 Mar 2018 13:37:01 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180305/8fa0a430/attachment.html>


More information about the asterisk-code-review mailing list