[asterisk-commits] russell: branch 1.4 r114545 - /branches/1.4/res/res_musiconhold.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 22 14:45:01 CDT 2008


Author: russell
Date: Tue Apr 22 14:45:00 2008
New Revision: 114545

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114545
Log:
Trivial change to read the number of samples from a frame before calling ast_write()

Modified:
    branches/1.4/res/res_musiconhold.c

Modified: branches/1.4/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_musiconhold.c?view=diff&rev=114545&r1=114544&r2=114545
==============================================================================
--- branches/1.4/res/res_musiconhold.c (original)
+++ branches/1.4/res/res_musiconhold.c Tue Apr 22 14:45:00 2008
@@ -304,8 +304,8 @@
 	while (state->sample_queue > 0) {
 		if ((f = moh_files_readframe(chan))) {
 			state->samples += f->samples;
+			state->sample_queue -= f->samples;
 			res = ast_write(chan, f);
-			state->sample_queue -= f->samples;
 			ast_frfree(f);
 			if (res < 0) {
 				ast_log(LOG_WARNING, "Failed to write frame to '%s': %s\n", chan->name, strerror(errno));




More information about the asterisk-commits mailing list