aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-25 22:04:46 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-25 22:04:46 +0000
commitc93f95b35c339965412022ddfbc1156df17c1cee (patch)
tree105c1f5c4109516bef23e8aaf4a5b0ffbadee273 /pbx
parent02b335c522d57f358247cbb7b54f0106736cc2ee (diff)
Lock the channel around datastore access
(closes issue #12527) Reported by: mnicholson Patches: pbx_lua4.diff uploaded by mnicholson (license 96) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114676 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_lua.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c
index a23b31ee2..6302ac655 100644
--- a/pbx/pbx_lua.c
+++ b/pbx/pbx_lua.c
@@ -982,7 +982,9 @@ static lua_State *lua_get_state(struct ast_channel *chan)
}
return L;
} else {
+ ast_channel_lock(chan);
datastore = ast_channel_datastore_find(chan, &lua_datastore, NULL);
+ ast_channel_unlock(chan);
if (!datastore) {
/* nothing found, allocate a new lua state */