res_pjsip: Use ast_sip_is_content_type() where appropriate

Change-Id: If3ab0d73d79ac4623308bd48508af2bfd554937d
This commit is contained in:
Sean Bright
2017-09-22 11:02:11 -04:00
parent 9576ae0e7e
commit f39af4d36d
4 changed files with 13 additions and 17 deletions

View File

@@ -69,8 +69,8 @@ static enum pjsip_status_code check_content_type(const pjsip_rx_data *rdata)
&rdata->msg_info.msg->body->content_type, "text", "plain");
} else {
res = rdata->msg_info.ctype &&
!pj_strcmp2(&rdata->msg_info.ctype->media.type, "text") &&
!pj_strcmp2(&rdata->msg_info.ctype->media.subtype, "plain");
ast_sip_is_content_type(
&rdata->msg_info.ctype->media, "text", "plain");
}
return res ? PJSIP_SC_OK : PJSIP_SC_UNSUPPORTED_MEDIA_TYPE;