[svn-commits] jpeeler: branch 1.6.1 r254065 - in /branches/1.6.1: ./ main/channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 23 16:20:27 CDT 2010


Author: jpeeler
Date: Tue Mar 23 16:20:22 2010
New Revision: 254065

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=254065
Log:
Merged revisions 254050 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r254050 | jpeeler | 2010-03-23 16:17:23 -0500 (Tue, 23 Mar 2010) | 14 lines
  
  Exit native bridging early for greater timing accuracy with warnings
  
  This changes native bridging to break one millisecond early so that the more
  accurate timeval calculations done in the generic bridge can be performed using
  the bridge config. Currently the time between exiting native bridging slightly
  late can sometimes cause a large enough discrepancy for warnings to be missed.
  For the record, 1.4 does not attempt to native bridge at all when warnings are
  enabled.
  
  (closes issue #15815)
  Reported by: adomjan
  
  Review: https://reviewboard.asterisk.org/r/577/
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/channel.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/main/channel.c?view=diff&rev=254065&r1=254064&r2=254065
==============================================================================
--- branches/1.6.1/main/channel.c (original)
+++ branches/1.6.1/main/channel.c Tue Mar 23 16:20:22 2010
@@ -5185,14 +5185,17 @@
 		bridge_play_sounds(c0, c1);
 
 		if (c0->tech->bridge &&
+			/* if < 1 ms remains use generic bridging for accurate timing */
+			(!config->timelimit || to > 1000 || to == 0) &&
 		    (c0->tech->bridge == c1->tech->bridge) &&
 		    !nativefailed && !c0->monitor && !c1->monitor &&
-		    !c0->audiohooks && !c1->audiohooks && 
+		    !c0->audiohooks && !c1->audiohooks &&
 		    !c0->masq && !c0->masqr && !c1->masq && !c1->masqr) {
+			int timeoutms = to - 1000 > 0 ? to - 1000 : to;
 			/* Looks like they share a bridge method and nothing else is in the way */
 			ast_set_flag(c0, AST_FLAG_NBRIDGE);
 			ast_set_flag(c1, AST_FLAG_NBRIDGE);
-			if ((res = c0->tech->bridge(c0, c1, config->flags, fo, rc, to)) == AST_BRIDGE_COMPLETE) {
+			if ((res = c0->tech->bridge(c0, c1, config->flags, fo, rc, timeoutms)) == AST_BRIDGE_COMPLETE) {
 				/* \todo  XXX here should check that cid_num is not NULL */
 				manager_event(EVENT_FLAG_CALL, "Unlink",
 					      "Channel1: %s\r\n"




More information about the svn-commits mailing list