diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-09 18:23:23 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-09 18:23:23 +0000 |
commit | 80b4d542795b96a228da7e7acd80d1886a57a4a8 (patch) | |
tree | 22a6217a9b9510800d2c627444405efb7bf36864 /main/loader.c | |
parent | 10e5af4280fb32aa71889678d7e3113fef9b9713 (diff) |
give a better error message when attempting to unload a module that is not loaded
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@275182 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/loader.c')
-rw-r--r-- | main/loader.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/loader.c b/main/loader.c index 6bd9ed3db..20a124f80 100644 --- a/main/loader.c +++ b/main/loader.c @@ -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"); |