[asterisk-commits] Change in asterisk[master]: res_pjsip_pubsub: On notify fail deleted sub_tree is then re...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 17 10:25:24 CDT 2015
Joshua Colp has submitted this change and it was merged.
Change subject: res_pjsip_pubsub: On notify fail deleted sub_tree is then referenced
......................................................................
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
---
M res/res_pjsip_pubsub.c
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
Matt Jordan: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Verified
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index e7b4b02..cf649b4 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -2601,11 +2601,12 @@
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);
}
- send_notify(sub_tree, 1);
- ast_test_suite_event_notify("SUBSCRIPTION_ESTABLISHED",
- "Resource: %s",
- sub_tree->root->resource);
}
resource_tree_destroy(&tree);
--
To view, visit https://gerrit.asterisk.org/135
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Scott Griepentrog <sgriepentrog at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list