[Asterisk-code-review] res pjsip pubsub: On recreated notify fail deleted sub tree ... (asterisk[13])

Joshua Colp asteriskteam at digium.com
Mon Aug 24 11:08:35 CDT 2015


Joshua Colp has uploaded a new change for review.

  https://gerrit.asterisk.org/1130

Change subject: res_pjsip_pubsub: On recreated notify fail deleted sub_tree is referenced
......................................................................

res_pjsip_pubsub: On recreated notify fail deleted sub_tree is referenced

When recreating a subscription it is possible for a freed sub_tree
to be referenced when the initial NOTIFY fails to be created.

Change-Id: I681c215309aad01b21d611c2de47b3b0a6022788
---
M res/res_pjsip_pubsub.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/30/1130/1

diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index 3e3ced7..8cd5b7b 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -1393,8 +1393,9 @@
 		subscription_persistence_update(sub_tree, &rdata);
 		if (generate_initial_notify(sub_tree->root)) {
 			pjsip_evsub_terminate(sub_tree->evsub, PJ_TRUE);
+		} else {
+			send_notify(sub_tree, 1);
 		}
-		send_notify(sub_tree, 1);
 	} else {
 		ast_sorcery_delete(ast_sip_get_sorcery(), persistence);
 	}

-- 
To view, visit https://gerrit.asterisk.org/1130
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I681c215309aad01b21d611c2de47b3b0a6022788
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list