mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
res_pjsip_pubsub: Increment persistence data ref when recreating.
Each subscription needs to have a reference to the persisted data for it, as well as the main JSON contained within the tree. When recreating a subscription this did not occur and they both shared the same reference. ASTERISK-28714 Change-Id: I706abd49ea182ea367a4ac3feca2706460ae9f4a
This commit is contained in:
committed by
Joshua Colp
parent
f29ddd8925
commit
a1f0c833ab
@@ -1264,7 +1264,7 @@ static struct ast_sip_subscription *allocate_subscription(const struct ast_sip_s
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (tree->persistence && tree->persistence->generator_data) {
|
if (tree->persistence && tree->persistence->generator_data) {
|
||||||
sub->persistence_data = ast_json_object_get(tree->persistence->generator_data, resource);
|
sub->persistence_data = ast_json_ref(ast_json_object_get(tree->persistence->generator_data, resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
sub->handler = handler;
|
sub->handler = handler;
|
||||||
|
Reference in New Issue
Block a user