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
1.4
Matthew Nicholson 15 years ago
parent 4654483d6b
commit de1dd975e6

@ -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");

Loading…
Cancel
Save