]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
disable unloading of embedded modules... there is a fundamental problem with doing...
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 22 Feb 2007 00:08:54 +0000 (00:08 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 22 Feb 2007 00:08:54 +0000 (00:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@56006 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/loader.c

index bf3f9ae0a80678f408bd0e66040b4bc570de03bb..6717a46992808dee46e0e6c8a352413b7204219d 100644 (file)
@@ -445,6 +445,11 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode f
        if (!ast_test_flag(mod, FLAG_RUNNING | FLAG_DECLINED))
                error = 1;
 
+       if (!mod->lib) {
+               ast_log(LOG_WARNING, "Unloading embedded modules is not supported.\n");
+               error = 1;
+       }
+
        if (!error && (mod->usecount > 0)) {
                if (force)
                        ast_log(LOG_WARNING, "Warning:  Forcing removal of module '%s' with use count %d\n",