diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-07-28 19:58:53 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-07-28 19:58:53 +0000 |
commit | 88cea437ab547d93a17ca6988fc5accddde1ced1 (patch) | |
tree | 8b4dbb0806aa7fd83277447eb4167bb9634da2d3 /channel.c | |
parent | b04f059b4abbc50f26b5b61f047d344d78dc5847 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } } |