[svn-commits] kmoore: branch 10 r371203 - in /branches/10: ./ apps/app_meetme.c main/loader.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Aug 13 15:04:19 CDT 2012


Author: kmoore
Date: Mon Aug 13 15:04:15 2012
New Revision: 371203

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371203
Log:
Add test instrumentation

This adds test instrumentation for loading and unloading of modules
and for certain actions in MeetMe to be used in the testsuite or any
other consumer of AMI events.  These will only be generated when
Asterisk is built with TEST_FRAMEWORK enabled.

(issue PQ-1131)
(issue PQ-1133)
........

Merged revisions 371201 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/apps/app_meetme.c
    branches/10/main/loader.c

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

Modified: branches/10/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_meetme.c?view=diff&rev=371203&r1=371202&r2=371203
==============================================================================
--- branches/10/apps/app_meetme.c (original)
+++ branches/10/apps/app_meetme.c Mon Aug 13 15:04:15 2012
@@ -2830,6 +2830,7 @@
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}
 	} else {
+		int lastusers = conf->users;
 		if (user->dahdichannel && ast_test_flag64(confflags, CONFFLAG_STARMENU)) {
 			/*  Set CONFMUTE mode on DAHDI channel to mute DTMF tones when the menu is enabled */
 			x = 1;
@@ -3109,7 +3110,15 @@
 				}
 				break;
 			}
-	
+
+			/* Throw a TestEvent if a user exit did not cause this user to leave the conference */
+			if (conf->users != lastusers) {
+				if (conf->users < lastusers) {
+					ast_test_suite_event_notify("NOEXIT", "Message: CONFFLAG_MARKEDEXIT\r\nLastUsers: %d\r\nUsers: %d", lastusers, conf->users);
+				}
+				lastusers = conf->users;
+			}
+
 			/* Check if my modes have changed */
 
 			/* If I should be muted but am still talker, mute me */

Modified: branches/10/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/loader.c?view=diff&rev=371203&r1=371202&r2=371203
==============================================================================
--- branches/10/main/loader.c (original)
+++ branches/10/main/loader.c Mon Aug 13 15:04:15 2012
@@ -54,6 +54,7 @@
 #include "asterisk/udptl.h"
 #include "asterisk/heap.h"
 #include "asterisk/app.h"
+#include "asterisk/test.h"
 
 #include <dlfcn.h>
 
@@ -567,8 +568,10 @@
 		mod->info->restore_globals();
 
 #ifdef LOADABLE_MODULES
-	if (!error)
+	if (!error) {
 		unload_dynamic_module(mod);
+		ast_test_suite_event_notify("MODULE_UNLOAD", "Message: %s", resource_name);
+	}
 #endif
 
 	if (!error)
@@ -899,6 +902,7 @@
 	int res;
 	AST_LIST_LOCK(&module_list);
 	res = load_resource(resource_name, 0, NULL, 0);
+	ast_test_suite_event_notify("MODULE_LOAD", "Message: %s", resource_name);
 	AST_LIST_UNLOCK(&module_list);
 
 	return res;




More information about the svn-commits mailing list