projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7be1714
)
Lock the channel around datastore access
author
Russell Bryant
<russell@russellbryant.com>
Fri, 25 Apr 2008 22:04:46 +0000
(22:04 +0000)
committer
Russell Bryant
<russell@russellbryant.com>
Fri, 25 Apr 2008 22:04:46 +0000
(22:04 +0000)
(closes issue #12527)
Reported by: mnicholson
Patches:
pbx_lua4.diff uploaded by mnicholson (license 96)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114676
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
pbx/pbx_lua.c
patch
|
blob
|
history
diff --git
a/pbx/pbx_lua.c
b/pbx/pbx_lua.c
index
a23b31e
..
6302ac6
100644
(file)
--- 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 */