aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-28 19:58:53 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-28 19:58:53 +0000
commitf768188647ec3c0ba83664c214d7622127812a52 (patch)
tree8b4dbb0806aa7fd83277447eb4167bb9634da2d3 /channel.c
parenta4784fa28c3b3a6bbf05746b1677151d89c60ea4 (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.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);
}
}