[asterisk-commits] mjordan: branch certified-11.2 r381447 - in /certified/branches/11.2: ./ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 14 12:46:26 CST 2013


Author: mjordan
Date: Thu Feb 14 12:46:21 2013
New Revision: 381447

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381447
Log:
Multiple revisions 378121,378459

........
  r378121 | kmoore | 2012-12-18 11:41:35 -0600 (Tue, 18 Dec 2012) | 14 lines
  
  Add test events for time limit-related hangups
  
  This patch adds hangup-related test events in order to support testing
  of time-limited bridges. This aids in testing the S() and L() bridge
  options.
  
  (issue SWP-4713)
  ........
  
  Merged revisions 378119 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378120 from http://svn.asterisk.org/svn/asterisk/branches/10
........
  r378459 | kmoore | 2013-01-03 12:48:00 -0600 (Thu, 03 Jan 2013) | 10 lines
  
  Add missing test event
  
  This test event was missing from channel.c causing the dial_LS_options
  test to fail intermittently because of a race condition where most code
  paths emitted the test event but this one did not. The dial_LS_options
  test should stop bouncing now.
  ........
  
  Merged revisions 378455 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 378121,378459 from http://svn.asterisk.org/svn/asterisk/branches/11

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

Propchange: certified/branches/11.2/
------------------------------------------------------------------------------
--- branch-11-merged (original)
+++ branch-11-merged Thu Feb 14 12:46:21 2013
@@ -1,1 +1,1 @@
-/branches/11:378038,378287,378321,378409-378411,378582,378687,378690,378984,379513,379790,380465,380698,380892,380894,380974,381306
+/branches/11:378038,378121,378287,378321,378409-378411,378459,378582,378687,378690,378984,379513,379790,380465,380698,380892,380894,380974,381306

Modified: certified/branches/11.2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/11.2/main/channel.c?view=diff&rev=381447&r1=381446&r2=381447
==============================================================================
--- certified/branches/11.2/main/channel.c (original)
+++ certified/branches/11.2/main/channel.c Thu Feb 14 12:46:21 2013
@@ -73,6 +73,7 @@
 #include "asterisk/data.h"
 #include "asterisk/channel_internal.h"
 #include "asterisk/features.h"
+#include "asterisk/test.h"
 
 /*** DOCUMENTATION
  ***/
@@ -602,6 +603,7 @@
 	if (ast_tvdiff_ms(*ast_channel_whentohangup(chan), ast_tvnow()) > 0)		/* no if hangup time has not come yet. */
 		return 0;
 	ast_debug(4, "Hangup time has come: %" PRIi64 "\n", ast_tvdiff_ms(*ast_channel_whentohangup(chan), ast_tvnow()));
+	ast_test_suite_event_notify("HANGUP_TIME", "Channel: %s", ast_channel_name(chan));
 	ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_TIMEOUT);	/* record event */
 	return 1;
 }
@@ -3194,6 +3196,7 @@
 				now = ast_tvnow();
 			diff = ast_tvsub(*ast_channel_whentohangup(c[x]), now);
 			if (diff.tv_sec < 0 || ast_tvzero(diff)) {
+				ast_test_suite_event_notify("HANGUP_TIME", "Channel: %s", ast_channel_name(c[x]));
 				/* Should already be hungup */
 				ast_channel_softhangup_internal_flag_add(c[x], AST_SOFTHANGUP_TIMEOUT);
 				ast_channel_unlock(c[x]);
@@ -3267,6 +3270,7 @@
 		now = ast_tvnow();
 		for (x = 0; x < n; x++) {
 			if (!ast_tvzero(*ast_channel_whentohangup(c[x])) && ast_tvcmp(*ast_channel_whentohangup(c[x]), now) <= 0) {
+				ast_test_suite_event_notify("HANGUP_TIME", "Channel: %s", ast_channel_name(c[x]));
 				ast_channel_softhangup_internal_flag_add(c[x], AST_SOFTHANGUP_TIMEOUT);
 				if (winner == NULL) {
 					winner = c[x];
@@ -7891,6 +7895,7 @@
 					bridge_playfile(c1, c0, config->end_sound, 0);
 				*fo = NULL;
 				res = 0;
+				ast_test_suite_event_notify("BRIDGE_TIMELIMIT", "Channel1: %s\r\nChannel2: %s", ast_channel_name(c0), ast_channel_name(c1));
 				break;
 			}
 




More information about the asterisk-commits mailing list