]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
give a better error message when attempting to unload a module that is not loaded
authorMatthew Nicholson <mnicholson@digium.com>
Fri, 9 Jul 2010 18:23:23 +0000 (18:23 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Fri, 9 Jul 2010 18:23:23 +0000 (18:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@275182 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/loader.c

index 6bd9ed3db5f7898cc517685fd4650278c40cfc25..20a124f8000554d8be6685c16a74c642ea687187 100644 (file)
@@ -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");