diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-28 19:58:53 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-28 19:58:53 +0000 |
commit | f768188647ec3c0ba83664c214d7622127812a52 (patch) | |
tree | 8b4dbb0806aa7fd83277447eb4167bb9634da2d3 /channel.c | |
parent | a4784fa28c3b3a6bbf05746b1677151d89c60ea4 (diff) |
just for fun, let's lock the whisper buffer for writing AND reading :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38441 f38db490-d61c-443f-a65b-d21fe96a405b
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); } } |