aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/module.h
AgeCommit message (Collapse)AuthorFilesLines
2009-12-09Set a module load priority for format modules.russell1-0/+8
A recent change to app_voicemail made it such that the module now assumes that all format modules are available while processing voicemail configuration. However, when autoloading modules, it was possible that app_voicemail was loaded before the format modules. Since format modules don't depend on anything, set a module load priority on them to ensure that they get loaded first when autoloading. This version of the patch is specific to Asterisk 1.4 and 1.6.0. These versions did not already support module load priority in the module API. This adds a trivial version of this which is just a module flag to include it in a pass before loading "everything". Thanks to mmichelson for the review! (closes issue #16412) Reported by: jiddings Tested by: russell Review: https://reviewboard.asterisk.org/r/445/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233782 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29update dev-mode compiler flags to match the ones used by default on Ubuntu ↵kpfleming1-4/+4
Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@159808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Add a new module flag to indicate that a build sum is present. Modules builtrussell1-2/+3
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-11-20re-doxygen some commentskpfleming1-5/+8
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89462 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20bring back compile-option checking when loading modules, only this time use ↵kpfleming1-1/+4
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-4/+1
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-1/+4
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-09-30Fix the AST_MODULE_INFO macro for C++ modules. The load and reload parametersrussell1-1/+1
were in the wrong place. (closes issue #10846, alebm) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84146 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05When shutting down "gracefully", go through and run the unload() callbacks forrussell1-0/+7
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
2006-10-30Issue #8246 - Doxygen fixes from kshumard. oej1-2/+2
An extra big thankyou is given to everyone that contributes to doxygen! THANK YOU! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46433 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-196/+113
- 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
2006-05-09various doxygen fixeskpfleming1-4/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26170 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-245/+67
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11remove an unused functionrizzo1-8/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19226 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11as discussed with kevin, moverizzo1-14/+0
ast_register_atexit()/ ast_unregister_atexit() into asterisk.h These are general functions, not restricted to modules, so move them in a more proper place. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19223 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08update module license key text and update loader to accept itkpfleming1-6/+11
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18574 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-10/+9
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06small cleanups to module.h and loader.c to start playing withrizzo1-12/+27
new-style modules using static symbols. Everything will still work as before, but new-style modules can now be defined by putting a '#define STATIC_MODULE' somewhere before including module.h, then declaring STATIC_MODULE the various methods (load, unload, key...) that the module is supposed to supply, and adding a 'STD_MOD(MOD_1, reload_fn, NULL, NULL)' macro call at the end. A module compiled in this way will be loaded RTLD_NOW|RTLD_LOCAL so symbol pollution is reduced, and symbols are resolved immediately. Removing just the '#define STATIC_MODULE' will restore the old behaviour. In order for a module to be loaded RTLD_NOW|RTLD_LOCAL, it must not export any symbol[1], and all the modules it depends on (e.g. res_*) must be loaded already. [1] Mechanisms are in place, and will be enabled later, to still allow such modules to 'export' symbols and resolving the dependencies irrespective of the load order. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17790 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-28Doxygen fixes oej1-10/+43
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15860 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-28Bring in the new loader code as described in mantis #4377rizzo1-83/+189
and updated to today's version. The core of the patch is only two files, loader.c and include/asterisk/module.h, with the other files touched only to adapt non-standard usages of the reference counts and localuser lists. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15784 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-28remove the long since unused STANDARD_LOCAL_USERS macrorizzo1-2/+0
so that new apps will not try to use it by mistake. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15517 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-25revert loader changes that have clearly not undergone adequate testing ↵kpfleming1-188/+84
before commit git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14952 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-25Bug 4377 - Round 2 of the loader updatestilghman1-84/+188
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14886 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-21update LOCAL_USER_ADD to use ast_callocrussell1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14000 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-15now that there are no modules that define their own version ofrussell1-11/+10
'struct localuser' (see issue #6216), redefine STANDARD_LOCAL_USER to empty, and define the localuser structure in module.h (issue #6494) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10223 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-13remove LOCAL_USER_ACF_ADD since it is now the same as LOCAL_USER_ADDrussell1-15/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9800 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-12major dialplan functions updatekpfleming1-1/+1
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9674 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-18constify arguments in more places where strings should not be modified ↵russell1-1/+1
(issue #6286) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8203 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-18allows for use of the originate function frommogorman1-0/+4
the cli patch 5847 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8186 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-28add macros for explicit module usecount increment/decrementkpfleming1-3/+15
remove unnecessary locking around setting usecount to zero git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6876 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-26clean up a lot of doxygen errors and warnings (issue #5522)russell1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6865 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.kpfleming1-9/+13
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6454 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-24clear out memory allocated by LOCAL_USER_ADD/LOCAL_USER_ACF_ADDkpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6395 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-25more extensive documentation (bug #4444)kpfleming1-69/+235
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6212 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-12add support for multiple-digit extensions in queue exit contexts (bug #4690)kpfleming1-0/+15
add QUEUEAGENTCOUNT dialplan function (bug #4690) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6114 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-24don't use locks when reading usecounts (reading only, not writing)kpfleming1-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5994 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06remove experimental module version tagskpfleming1-3/+1
add per-file revision tags and 'show version files' CLI command git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5864 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06add support for per-module version numberskpfleming1-2/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5862 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-16Optimize module loading (bug #3356)markster1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4814 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-15Repair // comments to /* */ comments (bug #3347)markster1-13/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4806 f38db490-d61c-443f-a65b-d21fe96a405b
2004-10-16Provide module command completion (make twisted happy)markster1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4022 f38db490-d61c-443f-a65b-d21fe96a405b
2004-10-14Add option for "show modules like" (bug #2643)markster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3996 f38db490-d61c-443f-a65b-d21fe96a405b
2004-09-02Don't try to look offhook with channel banks & Loopstart (bug #2362), also ↵markster1-1/+1
make individual modules reloadable... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3714 f38db490-d61c-443f-a65b-d21fe96a405b
2004-07-31Don't hard code the RTP payload type to 101 (bug #2192)markster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3552 f38db490-d61c-443f-a65b-d21fe96a405b
2004-06-09Merge FreeBSD locking fixes (bug #1411)markster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3176 f38db490-d61c-443f-a65b-d21fe96a405b
2003-08-13Totally revamp thread debugging to support locating and removing deadlocksmarkster1-9/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1310 f38db490-d61c-443f-a65b-d21fe96a405b
2003-08-07Allow groups to be checked in reverse order, make musiconhold die on restartmarkster1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1269 f38db490-d61c-443f-a65b-d21fe96a405b
2002-07-11Version 0.2.0 from FTPmarkster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@483 f38db490-d61c-443f-a65b-d21fe96a405b
2002-05-13Version 0.1.12 from FTPmarkster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@446 f38db490-d61c-443f-a65b-d21fe96a405b