[Asterisk-code-review] Change in asterisk[master]: res_pjsip_pubsub: On notify fail deleted sub_tree is then re...

Scott Griepentrog (Code Review) asteriskteam at digium.com
Thu Apr 16 13:26:49 CDT 2015


Scott Griepentrog has uploaded a new change for review.

  https://gerrit.asterisk.org/135

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

Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf
---
M res/res_pjsip_pubsub.c
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/35/135/3

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: newchange
Gerrit-Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Scott Griepentrog <sgriepentrog at digium.com>



More information about the asterisk-code-review mailing list