[asterisk-commits] res pjsip outbound publish: Fix crash when publishing device... (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 1 18:32:54 CDT 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4221 )

Change subject: res_pjsip_outbound_publish: Fix crash when publishing device state.
......................................................................


res_pjsip_outbound_publish: Fix crash when publishing device state.

While publishing device state between multiple instances of Asterisk,
a crash will sporadically occur under high CPS which looks to be a
race condition operating on the publisher queue.

ASTERISK-26506

Change-Id: I28da25d346deb358eff1d563485cabc433ce1ed6
---
M res/res_pjsip_outbound_publish.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c
index 0aad5fc..8768048 100644
--- a/res/res_pjsip_outbound_publish.c
+++ b/res/res_pjsip_outbound_publish.c
@@ -786,6 +786,7 @@
 	struct sip_outbound_publish_message *message;
 	size_t type_len = 0, subtype_len = 0, body_text_len = 0;
 	int *res = data;
+	SCOPED_AO2LOCK(lock, publisher);
 
 	*res = -1;
 	if (!publisher->client) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28da25d346deb358eff1d563485cabc433ce1ed6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Krokosz <mkrokosz at vonage.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list