aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-25 22:05:26 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-25 22:05:26 +0000
commit97e39c7f0cbe0d499a4f328ff4b54f2368513565 (patch)
treeeada1e67af106b067f6b52900fe012bc1db856aa /pbx
parentd69173634ba86abb05d46e40c6a7aee34c157a26 (diff)
Merged revisions 114676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r114676 | russell | 2008-04-25 17:04:46 -0500 (Fri, 25 Apr 2008) | 7 lines 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/branches/1.6.0@114677 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 */