summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-02-15 19:50:47 +0000
committerRussell Bryant <russell@russellbryant.com>2008-02-15 19:50:47 +0000
commit75fd299f1b118e29c1f9231fd90a472bdf4c0ed0 (patch)
tree9f978ba5cf4a74e28deffb013093336a2cffaa3e /main
parent71646d663bcbd72aa65316de97f35591a921a003 (diff)
Merged revisions 103728 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r103728 | russell | 2008-02-15 13:50:11 -0600 (Fri, 15 Feb 2008) | 4 lines 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". ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/loader.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/main/loader.c b/main/loader.c
index 08139af60..370e41fa4 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -589,8 +589,16 @@ int ast_module_reload(const char *name)
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 */