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

Matt Krokosz asteriskteam at digium.com
Fri Oct 28 13:30:21 CDT 2016


Matt Krokosz has uploaded a new change for review. ( 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(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/4221/1

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: newchange
Gerrit-Change-Id: I28da25d346deb358eff1d563485cabc433ce1ed6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Krokosz <mkrokosz at vonage.com>



More information about the asterisk-code-review mailing list