[Asterisk-code-review] SDP API: Add SSRC-level attributes (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Thu Apr 27 14:20:05 CDT 2017


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

Change subject: SDP API: Add SSRC-level attributes
......................................................................


Patch Set 2: Code-Review-1

(8 comments)

https://gerrit.asterisk.org/#/c/5550/2/main/rtp_engine.c
File main/rtp_engine.c:

Line 3344: 		return rtp->engine->ssrc_get(rtp);
Probably should lock rtp or instance as it is for most of the other functions for consistency.


Line 3352: 		return rtp->engine->cname_get(rtp);
same here.

Since this returns a string do you forsee this string ever changing during the life of the rtp instance?  If so then we may want to consider returning an ast_strdup() of it.


https://gerrit.asterisk.org/#/c/5550/2/main/sdp_private.h
File main/sdp_private.h:

Line 46: 		unsigned int ssrc: 1;
should be

...ssrc:1;

like all the other bit flags in Asterisk.


https://gerrit.asterisk.org/#/c/5550/2/main/sdp_state.c
File main/sdp_state.c:

Line 1196: static void add_ssrc_attributes(struct ast_sdp_m_line *m_line, const struct ast_sdp_options *options,
Should this return an error if we fail to create the a_line?


Line 1210: 	ast_sdp_m_add_a(m_line, a_line);
ast_sdp_m_add_a() is not NULL tolerant of a_line.


Line 1343: 	add_ssrc_attributes(m_line, options, rtp);
Should we fail the SDP m line creation if we couldn't add the ssrc attribute?


https://gerrit.asterisk.org/#/c/5550/2/res/res_rtp_asterisk.c
File res/res_rtp_asterisk.c:

Line 5820: static unsigned int ast_rtp_get_ssrc(struct ast_rtp_instance *instance)
Add comment to let know that instance is locked.

/*! \pre instance is locked */


Line 5827: static const char *ast_rtp_get_cname(struct ast_rtp_instance *instance)
Add comment to let know that instance is locked.

/*! \pre instance is locked */


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I29e7f23e7db77524f82a3b6e8531b1195ff57789
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list