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

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


Scott Griepentrog has uploaded a new change for review.

  https://gerrit.asterisk.org/136

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/36/136/1

diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index 5a0f963..0f08a0f 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/136
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f20ffc08b192f59c457293b218025a693992cbf
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Scott Griepentrog <sgriepentrog at digium.com>



More information about the asterisk-code-review mailing list