From: Kevin P. Fleming Date: Thu, 22 Feb 2007 00:08:54 +0000 (+0000) Subject: disable unloading of embedded modules... there is a fundamental problem with doing... X-Git-Tag: 1.4.1~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26bb928cfc70e6eca5db7ad7693da19bdbb2470b;p=thirdparty%2Fasterisk.git disable unloading of embedded modules... there is a fundamental problem with doing so that will not be fixed in this version of Asterisk due to its invasiveness git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@56006 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/loader.c b/main/loader.c index bf3f9ae0a8..6717a46992 100644 --- a/main/loader.c +++ b/main/loader.c @@ -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",