mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-05 20:55:26 +00:00
Merge "res_pjsip_pubsub: Check for Content-Type header in rx_notify_request" into 13
This commit is contained in:
@@ -3584,10 +3584,12 @@ error:
|
|||||||
return PJ_TRUE;
|
return PJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static pjsip_media_type simple_message_summary;
|
||||||
|
|
||||||
static pj_bool_t pubsub_on_rx_notify_request(pjsip_rx_data *rdata)
|
static pj_bool_t pubsub_on_rx_notify_request(pjsip_rx_data *rdata)
|
||||||
{
|
{
|
||||||
if (pj_stricmp2(&rdata->msg_info.msg->body->content_type.type, "application") == 0 &&
|
if (rdata->msg_info.msg->body &&
|
||||||
pj_stricmp2(&rdata->msg_info.msg->body->content_type.subtype, "simple-message-summary") == 0) {
|
pjsip_media_type_cmp(&rdata->msg_info.msg->body->content_type, &simple_message_summary, 0) == 0) {
|
||||||
return pubsub_on_rx_mwi_notify_request(rdata);
|
return pubsub_on_rx_mwi_notify_request(rdata);
|
||||||
}
|
}
|
||||||
return PJ_FALSE;
|
return PJ_FALSE;
|
||||||
@@ -5423,6 +5425,8 @@ static int load_module(void)
|
|||||||
return AST_MODULE_LOAD_DECLINE;
|
return AST_MODULE_LOAD_DECLINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pjsip_media_type_init2(&simple_message_summary, "application", "simple-message-summary");
|
||||||
|
|
||||||
if (ast_sched_start_thread(sched)) {
|
if (ast_sched_start_thread(sched)) {
|
||||||
ast_log(LOG_ERROR, "Could not start scheduler thread for publication expiration\n");
|
ast_log(LOG_ERROR, "Could not start scheduler thread for publication expiration\n");
|
||||||
ast_sched_context_destroy(sched);
|
ast_sched_context_destroy(sched);
|
||||||
|
Reference in New Issue
Block a user