summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2006-07-28 19:58:53 +0000
committerKevin P. Fleming <kpfleming@digium.com>2006-07-28 19:58:53 +0000
commit88cea437ab547d93a17ca6988fc5accddde1ced1 (patch)
tree8b4dbb0806aa7fd83277447eb4167bb9634da2d3 /channel.c
parentb04f059b4abbc50f26b5b61f047d344d78dc5847 (diff)
just for fun, let's lock the whisper buffer for writing AND reading :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index d8b3e83ec..965f87c77 100644
--- a/channel.c
+++ b/channel.c
@@ -2469,8 +2469,10 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
.samples = f->samples,
};
+ ast_mutex_lock(&chan->whisper->lock);
if (ast_slinfactory_read(&chan->whisper->sf, buf, f->samples))
ast_frame_slinear_sum(f, &whisper);
+ ast_mutex_unlock(&chan->whisper->lock);
}
}