From: Matthew Jordan Date: Wed, 24 Dec 2014 16:59:42 +0000 (+0000) Subject: main/pbx.c: Fix double lock of contexts lock introduced by r429967 X-Git-Tag: 14.0.0-beta1~1361 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a73c6c90e8a9e1e42cc530569273a59febab86d;p=thirdparty%2Fasterisk.git main/pbx.c: Fix double lock of contexts lock introduced by r429967 We only need to hold the context_merge_lock once. Locking it twice will make many other parts of Asterisk very sad. ASTERISK-24641 #close git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430111 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index 267717e48d..77590963fe 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -11858,8 +11858,6 @@ static void presence_state_cb(void *unused, struct stasis_subscription *sub, str return; } - ast_mutex_lock(&context_merge_lock);/* Hold off ast_merge_contexts_and_delete */ - cmpdevice = ast_alloca(sizeof(*cmpdevice) + strlen(presence_state->provider)); strcpy(cmpdevice->hintdevice, presence_state->provider);