aboutsummaryrefslogtreecommitdiffstats
path: root/main/loader.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-27Use the lock (which already existed, it just wasn't used) on the updaters ↵file1-6/+6
list to protect the contents instead of the overall module list lock. (closes issue #12080) Reported by: ChaseVenters git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104596 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-15In the case that you try to directly reload a module has returned russell1-2/+10
AST_MODULE_LOAD_DECLINE, log a message indicating that the module is not fully initialized and must be initialized using "module load". git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103728 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-15Don't attempt to execute the reload callback for a module that returnedrussell1-1/+1
AST_MODULE_LOAD_DECLINE. This fixes a crash that was reported against chan_console in trunk. (closes issue #11953, reported by junky, fixed by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103726 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Add a new module flag to indicate that a build sum is present. Modules builtrussell1-2/+4
against older Asterisk 1.4 headers will now load properly with just a warning indicating that they are old and may cause problems. (patch by paravoid) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91501 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Make sure logger is reloaded at general reload in the cli.oej1-0/+1
(Discovered during Asterisk training in Portugal) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91366 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20bring back compile-option checking when loading modules, only this time use ↵kpfleming1-0/+9
a string-based storage and comparison mechanism because it is easier to support on other platforms git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89461 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Temporarily revert revision 89325, which added md5 magic for keeping track ofrussell1-11/+0
what build options were used. We agreed that we should remove this before making a 1.4 release, and then we can put it back in. Then, we can take a month or so to play around with it to get it how we want it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89339 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16To help combat problems where people build external modules (asterisk-addons ↵kpfleming1-0/+11
or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash. If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89325 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Fixes for building under OpenSolaris.file1-6/+6
(closes issue #11047) Reported by: snuffy Patches: 11047-fixes.diff uploaded by snuffy (license 35) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86630 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05When shutting down "gracefully", go through and run the unload() callbacks forrussell1-0/+25
all of the modules. "stop now" is considered a non-graceful shutdown and will not go through this process. (issue #9804, reported by chrisost, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@67308 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-03improve loader a bit, by avoiding trying to initialize embedded modules ↵kpfleming1-24/+33
twice and avoiding trying to load modules from disk when they have been loaded already during the 'preload' pass (reported by blitzrage on IRC, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62986 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20Merged revisions 61704 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61704 | qwell | 2007-04-20 16:14:27 -0500 (Fri, 20 Apr 2007) | 4 lines Fix an issue that I noticed while looking over issue 9571. The reload timestamp was getting set after reloading the built-in stuff, and before the modules. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61705 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-22disable unloading of embedded modules... there is a fundamental problem with ↵kpfleming1-0/+5
doing so that will not be fixed in this version of Asterisk due to its invasiveness git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56006 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-08Issue 9007 - Mutex not released on early returntilghman1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53532 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-21Don't use promotion on Darwin because it doesn't seem to work quite right in ↵file1-2/+2
all cases, this should solve the unresolved symbol issue people have been seeing. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@45817 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04ensure that local include files are always usedkpfleming1-3/+4
avoid a duplicate function name (term_init()) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44322 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-15reveting modifaction to __ast_module_user_removeanthonyl1-20/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42965 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-13Tweak changes that went in on revision 42891file1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42910 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-13small fix for 7944anthonyl1-0/+11
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42891 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-26ensure that unload_dynamic_module won't continue dereferencing a module ↵kpfleming1-3/+8
pointer after the module has been unloaded from memory git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41196 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-25instead of reverting this supposedly 'stupid' change, let's try to get it ↵kpfleming1-0/+9
working properly also eliminate a warning from dlopen() because some flags were missing on the second dlopen() call git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41087 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-24Revert stupid RTLD_NOLOAD change that breaks module loading on some systems.mattf1-9/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40981 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-23use RTLD_NOLOAD if it's available to make loading dynamic modules a little ↵kpfleming1-8/+22
faster and less resource-intensive also, keep trying to dlclose() a module until it actually goes away, since it may have other modules it brought in when it was loaded (thanks PCadach for pointing this problem out to me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40949 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-22generate a message when a module cannot be found and loadable modules are ↵kpfleming1-0/+1
disabled git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40866 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-22minor improvementskpfleming1-22/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40863 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-22when loadable modules are disabled, if someone tries to load a module that ↵kpfleming1-0/+2
does not exist, don't dereference a NULL pointer, just stop trying to load it... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40854 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21restore 'preload' functionality in loaderkpfleming1-6/+14
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40796 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21restore printing of module name during loadingkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40784 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21use a safer process for checking if a module wants to export symbols into ↵kpfleming1-22/+32
the global namespace git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40769 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21don't declare these variables unless neededkpfleming1-2/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40751 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-0/+883
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b