mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-10 00:16:50 -07:00
give a better error message when attempting to unload a module that is not loaded
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@275182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+3
-1
@@ -498,8 +498,10 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode f
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!mod->flags.running || mod->flags.declined)
|
||||
if (!mod->flags.running || mod->flags.declined) {
|
||||
ast_log(LOG_WARNING, "Unload failed, '%s' is not loaded.\n", resource_name);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
if (!mod->lib) {
|
||||
ast_log(LOG_WARNING, "Unloading embedded modules is not supported.\n");
|
||||
|
||||
Reference in New Issue
Block a user