From: Matthew Nicholson Date: Fri, 9 Jul 2010 18:23:23 +0000 (+0000) Subject: give a better error message when attempting to unload a module that is not loaded X-Git-Tag: 1.4.35-rc1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de1dd975e68be00e22833c1aa7692f4da3e07ca4;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/loader.c b/main/loader.c index 6bd9ed3db5..20a124f800 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");