[asterisk-commits] res pjsip pubsub: Move where the subscription is stored to a... (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 15 14:44:53 CST 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: res_pjsip_pubsub: Move where the subscription is stored to after initialized.
......................................................................
res_pjsip_pubsub: Move where the subscription is stored to after initialized.
A problem arose when testing the AMI subscription listing actions where it
was possible for a subscription that had not been fully initialized to be
listed. This was problematic as the underlying listing code would crash.
This change makes it so the subscription tree is fully set up before it is
added to the list of subscriptions. This ensures that when the listing actions
get the subscription it is valid.
ASTERISK-25738 #close
Change-Id: Iace2b13641c31bbcc0d43a39f99aba1f340c0f48
---
M res/res_pjsip_pubsub.c
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Mark Michelson: Looks good to me, approved
Anonymous Coward #1000019: Verified
George Joseph: Looks good to me, but someone else must approve
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index c914641..8b37dd0 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -1254,7 +1254,6 @@
sub_tree->endpoint = ao2_bump(endpoint);
sub_tree->notify_sched_id = -1;
- add_subscription(sub_tree);
return sub_tree;
}
@@ -1327,6 +1326,8 @@
if (AST_VECTOR_SIZE(&sub_tree->root->children) > 0) {
sub_tree->is_list = 1;
}
+
+ add_subscription(sub_tree);
return sub_tree;
}
@@ -1616,6 +1617,8 @@
return NULL;
}
+ add_subscription(sub_tree);
+
return sub;
}
--
To view, visit https://gerrit.asterisk.org/2247
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iace2b13641c31bbcc0d43a39f99aba1f340c0f48
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list