[svn-commits] kmoore: branch 10 r378120 - in /branches/10: ./ main/channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 18 11:38:26 CST 2012


Author: kmoore
Date: Tue Dec 18 11:38:22 2012
New Revision: 378120

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378120
Log:
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

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

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/channel.c?view=diff&rev=378120&r1=378119&r2=378120
==============================================================================
--- branches/10/main/channel.c (original)
+++ branches/10/main/channel.c Tue Dec 18 11:38:22 2012
@@ -72,6 +72,7 @@
 #include "asterisk/global_datastores.h"
 #include "asterisk/data.h"
 #include "asterisk/features.h"
+#include "asterisk/test.h"
 
 #ifdef HAVE_EPOLL
 #include <sys/epoll.h>
@@ -3263,6 +3264,7 @@
 				now = ast_tvnow();
 			diff = ast_tvsub(c[x]->whentohangup, now);
 			if (diff.tv_sec < 0 || ast_tvzero(diff)) {
+				ast_test_suite_event_notify("HANGUP_TIME", "Channel: %s", c[x]->name);
 				/* Should already be hungup */
 				c[x]->_softhangup |= AST_SOFTHANGUP_TIMEOUT;
 				ast_channel_unlock(c[x]);
@@ -3331,6 +3333,7 @@
 		now = ast_tvnow();
 		for (x = 0; x < n; x++) {
 			if (!ast_tvzero(c[x]->whentohangup) && ast_tvcmp(c[x]->whentohangup, now) <= 0) {
+				ast_test_suite_event_notify("HANGUP_TIME", "Channel: %s", c[x]->name);
 				c[x]->_softhangup |= AST_SOFTHANGUP_TIMEOUT;
 				if (winner == NULL)
 					winner = c[x];
@@ -7765,6 +7768,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", c0->name, c1->name);
 				break;
 			}
 




More information about the svn-commits mailing list