Merge "res_pjsip: Use ast_sip_is_content_type() where appropriate"

This commit is contained in:
Joshua Colp
2017-09-25 07:28:41 -05:00
committed by Gerrit Code Review
4 changed files with 13 additions and 17 deletions

View File

@@ -4013,8 +4013,9 @@ static void session_outgoing_nat_hook(pjsip_tx_data *tdata, struct ast_sip_trans
int stream;
/* SDP produced by us directly will never be multipart */
if (!transport_state || hook || !tdata->msg->body || pj_stricmp2(&tdata->msg->body->content_type.type, "application") ||
pj_stricmp2(&tdata->msg->body->content_type.subtype, "sdp") || ast_strlen_zero(transport->external_media_address)) {
if (!transport_state || hook || !tdata->msg->body ||
!ast_sip_is_content_type(&tdata->msg->body->content_type, "application", "sdp") ||
ast_strlen_zero(transport->external_media_address)) {
return;
}