[asterisk-commits] mjordan: branch 10 r364965 - /branches/10/main/audiohook.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 1 21:44:19 CDT 2012
Author: mjordan
Date: Tue May 1 21:44:15 2012
New Revision: 364965
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=364965
Log:
Only log a failure to get read/write samples from factories if it didn't happen
In audiohook_read_frame_both, anytime samples are obtained from the read/write
factories a debug statement is logged stating that samples were not obtained
from the factories. This statement used to only occur if option_debug was
turned on and no samples were obtained; in some refactoring when the
option_debug statement was removed, the "else" clause was removed as well.
This patch makes it so that those debug log statements only occur if the
condition leading up to them actually happened.
Modified:
branches/10/main/audiohook.c
Modified: branches/10/main/audiohook.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/audiohook.c?view=diff&rev=364965&r1=364964&r2=364965
==============================================================================
--- branches/10/main/audiohook.c (original)
+++ branches/10/main/audiohook.c Tue May 1 21:44:15 2012
@@ -288,8 +288,9 @@
}
}
}
- }
- ast_debug(1, "Failed to get %d samples from read factory %p\n", (int)samples, &audiohook->read_factory);
+ } else {
+ ast_debug(1, "Failed to get %d samples from read factory %p\n", (int)samples, &audiohook->read_factory);
+ }
/* Move on to the write factory... if there are enough samples, read them in */
if (usable_write) {
@@ -307,8 +308,9 @@
}
}
}
- }
- ast_debug(1, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory);
+ } else {
+ ast_debug(1, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory);
+ }
/* Basically we figure out which buffer to use... and if mixing can be done here */
if (read_buf && read_reference) {
More information about the asterisk-commits
mailing list