[Asterisk-code-review] res pjsip pubsub: fixed a bug when pjsip tx data dec ref is ... (asterisk[certified/13.8])

George Joseph asteriskteam at digium.com
Thu Oct 13 09:56:19 CDT 2016


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/4083

Change subject: res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice.
......................................................................

res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice.

This patch removed call of pjsip_tx_data_dec_ref in send_notify
if send_request failed.
The pjsip_dlg_send_request deletes the message on error by itself.

It seems this patch fixes next issues:
ASTERISK-26199
ASTERISK-26166
ASTERISK-26174

Change-Id: I8b05917c93d993f95d604c042ace5f1a5500f59a
(cherry picked from commit 5997ec7c9e70f3b12afb948c421355fb87aed44e)
---
M res/res_pjsip_pubsub.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/83/4083/1

diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index c24ac01..7db2b4d 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -2271,7 +2271,7 @@
 	}
 
 	if (sip_subscription_send_request(sub_tree, tdata)) {
-		pjsip_tx_data_dec_ref(tdata);
+		/* do not call pjsip_tx_data_dec_ref(tdata). The pjsip_dlg_send_request deletes the message on error */
 		return -1;
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b05917c93d993f95d604c042ace5f1a5500f59a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.8
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>



More information about the asterisk-code-review mailing list