aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-22 19:45:00 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-22 19:45:00 +0000
commit0f572d416bc6cd1ed82cb9493cd1d2daff48667f (patch)
treed77e56439152ffbff77d87d870d99cdbeb826993 /res
parent8122493b5ac4247423c34dad114db6cc6396b933 (diff)
Trivial change to read the number of samples from a frame before calling ast_write()
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114545 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_musiconhold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 31cc39130..b2a92ae57 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -304,8 +304,8 @@ static int moh_files_generator(struct ast_channel *chan, void *data, int len, in
while (state->sample_queue > 0) {
if ((f = moh_files_readframe(chan))) {
state->samples += f->samples;
- res = ast_write(chan, f);
state->sample_queue -= f->samples;
+ res = ast_write(chan, f);
ast_frfree(f);
if (res < 0) {
ast_log(LOG_WARNING, "Failed to write frame to '%s': %s\n", chan->name, strerror(errno));