mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Merge "res_pjsip_mwi.c: Fix null pointer crash" into 13
This commit is contained in:
@@ -650,11 +650,11 @@ static void send_mwi_notify(struct mwi_subscription *sub)
|
|||||||
.body_type = AST_SIP_MESSAGE_ACCUMULATOR,
|
.body_type = AST_SIP_MESSAGE_ACCUMULATOR,
|
||||||
.body_data = &counter,
|
.body_data = &counter,
|
||||||
};
|
};
|
||||||
const char *resource = ast_sip_subscription_get_resource_name(sub->sip_sub);
|
|
||||||
|
|
||||||
ao2_callback(sub->stasis_subs, OBJ_NODATA, get_message_count, &counter);
|
ao2_callback(sub->stasis_subs, OBJ_NODATA, get_message_count, &counter);
|
||||||
|
|
||||||
if (sub->is_solicited) {
|
if (sub->is_solicited) {
|
||||||
|
const char *resource = ast_sip_subscription_get_resource_name(sub->sip_sub);
|
||||||
struct ast_sip_endpoint *endpoint = ast_sip_subscription_get_endpoint(sub->sip_sub);
|
struct ast_sip_endpoint *endpoint = ast_sip_subscription_get_endpoint(sub->sip_sub);
|
||||||
struct ast_sip_aor *aor = find_aor_for_resource(endpoint, resource);
|
struct ast_sip_aor *aor = find_aor_for_resource(endpoint, resource);
|
||||||
pjsip_dialog *dlg = ast_sip_subscription_get_dialog(sub->sip_sub);
|
pjsip_dialog *dlg = ast_sip_subscription_get_dialog(sub->sip_sub);
|
||||||
|
|||||||
Reference in New Issue
Block a user