[Asterisk-code-review] chan pjsip: Multistream: Modify use of ast sip session media (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Wed Jun 14 17:42:12 CDT 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/5824 )

Change subject: chan_pjsip: Multistream: Modify use of ast_sip_session_media
......................................................................


Patch Set 1:

(5 comments)

This was a fairly quick exam.  Will look more tomorrow.

https://gerrit.asterisk.org/#/c/5824/1/include/asterisk/res_pjsip_session.h
File include/asterisk/res_pjsip_session.h:

https://gerrit.asterisk.org/#/c/5824/1/include/asterisk/res_pjsip_session.h@127
PS1, Line 127: 	AST_VECTOR(, struct ast_sip_session_media *) media;
This is going to need a lock to protect access.  The serializer and channel threads have contention for the vector.

* The T.38 frame hooks run under the channel thread.
* The chan pvt for chan_pjsip frame read/write run under the channel thread.  Though if the vector is copied to the chan pvt this case may not be a problem.
* I think most other accesses are run under the serializer thread.

The lock is needed even more now because the vector can change during a call if streams are added/removed.


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

https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_session.c@255
PS1, Line 255: 		AST_VECTOR_REPLACE(&session->media, position, session_media);
A sesssion_media ref is held by the vector so a replace needs to unref the previous occupant of the position.


https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_session.c@419
PS1, Line 419: static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_sdp_session *local, const pjmedia_sdp_session *remote)
The queuing of the null frame is missing.  I think there was a reason the null frame was queued when all streams were successfully negotiated.  I don't know if it is still required though.


https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_session.c@1358
PS1, Line 1358: 	for (i = 0; i < AST_VECTOR_SIZE(&session->media); ++i) {
              : 		ao2_cleanup(AST_VECTOR_GET(&session->media, i));
              : 	}
AST_VECTOR_CALLBACK_VOID(&session->media, ao2_cleanup)


https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_t38.c
File res/res_pjsip_t38.c:

https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_t38.c@847
PS1, Line 847: static int apply_negotiated_sdp_stream(struct ast_sip_session *session, 
blob



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I144b04f43633387b8e42a43ef3b25d7c5682b451
Gerrit-Change-Number: 5824
Gerrit-PatchSet: 1
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 14 Jun 2017 22:42:12 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170614/3c927e3a/attachment.html>


More information about the asterisk-code-review mailing list