mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 23:16:04 +00:00
res_pjsip_pubsub: On notify fail deleted sub_tree is then referenced
This change makes the send_notify of the sub_tree not happen when the sub_tree has been deleted due to the notify call failing, which avoids a crash. ASTERISK-24970 #close Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf
This commit is contained in:
committed by
Scott Griepentrog
parent
70c3759c40
commit
664d3263e4
@@ -2601,12 +2601,13 @@ static pj_bool_t pubsub_on_rx_subscribe_request(pjsip_rx_data *rdata)
|
||||
sip_subscription_accept(sub_tree, rdata, resp);
|
||||
if (generate_initial_notify(sub_tree->root)) {
|
||||
pjsip_evsub_terminate(sub_tree->evsub, PJ_TRUE);
|
||||
}
|
||||
} else {
|
||||
send_notify(sub_tree, 1);
|
||||
ast_test_suite_event_notify("SUBSCRIPTION_ESTABLISHED",
|
||||
"Resource: %s",
|
||||
sub_tree->root->resource);
|
||||
}
|
||||
}
|
||||
|
||||
resource_tree_destroy(&tree);
|
||||
return PJ_TRUE;
|
||||
|
Reference in New Issue
Block a user