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:
fec02c2
)
Lock on indication too
author
Mark Spencer
<markster@digium.com>
Mon, 12 Apr 2004 22:00:12 +0000
(22:00 +0000)
committer
Mark Spencer
<markster@digium.com>
Mon, 12 Apr 2004 22:00:12 +0000
(22:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2680
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
channels/chan_zap.c
patch
|
blob
|
history
diff --git
a/channels/chan_zap.c
b/channels/chan_zap.c
index
5eccced
..
5803768
100755
(executable)
--- a/
channels/chan_zap.c
+++ b/
channels/chan_zap.c
@@
-3855,7
+3855,9
@@
static int zt_indicate(struct ast_channel *chan, int condition)
{
struct zt_pvt *p = chan->pvt->pvt;
int res=-1;
- int index = zt_get_index(chan, p, 0);
+ int index;
+ ast_mutex_lock(&p->lock);
+ index = zt_get_index(chan, p, 0);
if (index == SUB_REAL) {
switch(condition) {
case AST_CONTROL_BUSY:
@@
-3917,6
+3919,7
@@
static int zt_indicate(struct ast_channel *chan, int condition)
}
} else
res = 0;
+ ast_mutex_unlock(&p->lock);
return res;
}