diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-09-22 11:02:11 -0400 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-09-22 10:05:04 -0500 |
commit | 875568c0f9c8d6f6c317e6a34fd7d87196e05aee (patch) | |
tree | fa9a60ff6e27c2bfae22ee77e37d43a4120988f0 /res/res_pjsip_publish_asterisk.c | |
parent | ddc216f12edf2980554398e459034073ffe6f312 (diff) |
res_pjsip: Use ast_sip_is_content_type() where appropriate
Change-Id: If3ab0d73d79ac4623308bd48508af2bfd554937d
Diffstat (limited to 'res/res_pjsip_publish_asterisk.c')
-rw-r--r-- | res/res_pjsip_publish_asterisk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/res/res_pjsip_publish_asterisk.c b/res/res_pjsip_publish_asterisk.c index 7e87762fd..fa5e4ced7 100644 --- a/res/res_pjsip_publish_asterisk.c +++ b/res/res_pjsip_publish_asterisk.c @@ -605,8 +605,7 @@ static int asterisk_publication_devicestate_state_change(struct ast_sip_publicat } /* We only accept JSON for content */ - if (pj_strcmp2(&body->content_type.type, "application") || - pj_strcmp2(&body->content_type.subtype, "json")) { + if (!ast_sip_is_content_type(&body->content_type, "application", "json")) { ast_debug(2, "Received unsupported content type for Asterisk event on resource '%s'\n", ast_sorcery_object_get_id(config)); return -1; @@ -697,8 +696,7 @@ static int asterisk_publication_mwi_state_change(struct ast_sip_publication *pub } /* We only accept JSON for content */ - if (pj_strcmp2(&body->content_type.type, "application") || - pj_strcmp2(&body->content_type.subtype, "json")) { + if (!ast_sip_is_content_type(&body->content_type, "application", "json")) { ast_debug(2, "Received unsupported content type for Asterisk event on resource '%s'\n", ast_sorcery_object_get_id(config)); return -1; |