[asterisk-commits] russell: branch 1.4 r103728 - /branches/1.4/main/loader.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 15 13:50:12 CST 2008


Author: russell
Date: Fri Feb 15 13:50:11 2008
New Revision: 103728

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103728
Log:
In the case that you try to directly reload a module has returned 
AST_MODULE_LOAD_DECLINE, log a message indicating that the module is not fully
initialized and must be initialized using "module load".

Modified:
    branches/1.4/main/loader.c

Modified: branches/1.4/main/loader.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/loader.c?view=diff&rev=103728&r1=103727&r2=103728
==============================================================================
--- branches/1.4/main/loader.c (original)
+++ branches/1.4/main/loader.c Fri Feb 15 13:50:11 2008
@@ -578,8 +578,16 @@
 		if (name && resource_name_match(name, cur->resource))
 			continue;
 
-		if (!cur->flags.running || cur->flags.declined)
-			continue;
+		if (!cur->flags.running || cur->flags.declined) {
+			if (!name)
+				continue;
+			ast_log(LOG_NOTICE, "The module '%s' was not properly initialized.  "
+				"Before reloading the module, you must run \"module load %s\" "
+				"and fix whatever is preventing the module from being initialized.\n",
+				name, name);
+			res = 2; /* Don't report that the module was not found */
+			break;
+		}
 
 		if (!info->reload) {	/* cannot be reloaded */
 			if (res < 1)	/* store result if possible */




More information about the asterisk-commits mailing list