[Asterisk-code-review] res pjsip pubsub: On notify fail deleted sub tree is then re... (asterisk[certified/13.1])
Richard Mudgett
asteriskteam at digium.com
Fri Aug 21 13:04:04 CDT 2015
Richard Mudgett has uploaded a new change for review.
https://gerrit.asterisk.org/1125
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
(cherry picked from commit 8d4ce7cc2b87317005588e700b278a8cca7005c8)
---
M res/res_pjsip_pubsub.c
1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/1125/1
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index 3eb0eeb..24c1554 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -2607,11 +2607,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/1125
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>
More information about the asterisk-code-review
mailing list