[svn-commits] kmoore: branch certified-1.8.15 r371397 - in /certified/branches/1.8.15: ./ m...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Aug 16 17:47:08 CDT 2012


Author: kmoore
Date: Thu Aug 16 17:47:04 2012
New Revision: 371397

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371397
Log:
Add module reload instrumentation for TEST_FRAMEWORK

This adds AMI events for module reloads when Asterisk is built with
TEST_FRAMEWORK enabled and corrects generation of the module load AMI
event.

(issue PQ-1126)
........

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

Modified:
    certified/branches/1.8.15/   (props changed)
    certified/branches/1.8.15/main/loader.c

Propchange: certified/branches/1.8.15/
------------------------------------------------------------------------------
--- branch-1.8-merged (original)
+++ branch-1.8-merged Thu Aug 16 17:47:04 2012
@@ -1,1 +1,1 @@
-/branches/1.8:1-369921,370769,371141,371201
+/branches/1.8:1-369921,370769,371141,371201,371393

Modified: certified/branches/1.8.15/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/1.8.15/main/loader.c?view=diff&rev=371397&r1=371396&r2=371397
==============================================================================
--- certified/branches/1.8.15/main/loader.c (original)
+++ certified/branches/1.8.15/main/loader.c Thu Aug 16 17:47:04 2012
@@ -745,6 +745,8 @@
 		}
 
 		if (!info->reload) {	/* cannot be reloaded */
+			/* Nothing to reload, so reload is successful */
+			ast_test_suite_event_notify("MODULE_RELOAD", "Message: %s", cur->resource);
 			if (res < 1)	/* store result if possible */
 				res = 1;	/* 1 = no reload() method */
 			continue;
@@ -752,7 +754,9 @@
 
 		res = 2;
 		ast_verb(3, "Reloading module '%s' (%s)\n", cur->resource, info->description);
-		info->reload();
+		if (!info->reload()) {
+			ast_test_suite_event_notify("MODULE_RELOAD", "Message: %s", cur->resource);
+		}
 	}
 	AST_LIST_UNLOCK(&module_list);
 
@@ -896,7 +900,9 @@
 	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);
+	if (!res) {
+		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