[asterisk-commits] mjordan: trunk r429034 - in /trunk: ./ res/res_monitor.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Dec 6 12:16:52 CST 2014


Author: mjordan
Date: Sat Dec  6 12:16:49 2014
New Revision: 429034

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429034
Log:
res/res_monitor: Reset in/out sample counts on Monitor start

When repeatedly starting/stopping a Monitor on a channel, the accumulated
in/out sample counts are never reset to 0. This can cause inadvertent jumps
in the recordings, as the code in the channel core will determine incorrectly
that a jump in the recorded file position should occur. Setting the sample
counts to 0 simply reflects the initial state a Monitor should be in when it
is started, as this is the initial count that would be on the channels at that
time.

ASTERISK-24573 #close
Reported by: Nuno Borges
patches:
  24573.patch uploaded by Nuno Borges (License 6116)
........

Merged revisions 429031 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 429032 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 429033 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/res/res_monitor.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/res_monitor.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_monitor.c?view=diff&rev=429034&r1=429033&r2=429034
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Sat Dec  6 12:16:49 2014
@@ -402,6 +402,8 @@
 		} else
 			monitor->write_stream = NULL;
 
+		ast_channel_insmpl_set(chan, 0);
+		ast_channel_outsmpl_set(chan, 0);
 		ast_channel_monitor_set(chan, monitor);
 		ast_monitor_set_state(chan, AST_MONITOR_RUNNING);
 		/* so we know this call has been monitored in case we need to bill for it or something */




More information about the asterisk-commits mailing list