diff options
author | mkrokosz <mkrokosz@vonage.com> | 2016-10-28 14:30:02 -0400 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-11-01 13:38:02 -0500 |
commit | d3e0d5d40b02d970f5ff38d69f47c05cd09e0a78 (patch) | |
tree | 5e79604195be41da7a04c28df9370be53709b415 /res | |
parent | d9f9691d319f680daf6477fcbaf725e38f9de220 (diff) |
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
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip_outbound_publish.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c index 0aad5fcdb..87680480c 100644 --- a/res/res_pjsip_outbound_publish.c +++ b/res/res_pjsip_outbound_publish.c @@ -786,6 +786,7 @@ static int publisher_client_send(void *obj, void *arg, void *data, int flags) 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) { |