aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/module.h
AgeCommit message (Collapse)AuthorFilesLines
2009-07-27Merged revisions 209098 via svnmerge from dbrooks1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r209098 | dbrooks | 2009-07-27 11:33:50 -0500 (Mon, 27 Jul 2009) | 6 lines Fixing typos. Replaces "recieved" with "received" and "initilize" with "initialize" (closes issue #15571) Reported by: alecdavis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@209233 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-22Merged revisions 202410 via svnmerge from dvossel1-4/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r202410 | dvossel | 2009-06-22 10:33:35 -0500 (Mon, 22 Jun 2009) | 5 lines attempting to load running modules Modules placed in the priority heap for loading were not properly removed from the linked list. This resulted in some modules attempting to load twice. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@202412 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-09Merged revisions 199743 via svnmerge from dvossel1-0/+8
https://origsvn.digium.com/svn/asterisk/trunk ........ r199743 | dvossel | 2009-06-09 11:22:04 -0500 (Tue, 09 Jun 2009) | 11 lines module load priority This patch adds the option to give a module a load priority. The value represents the order in which a module's load() function is initialized. The lower the value, the higher the priority. The value is only checked if the AST_MODFLAG_LOAD_ORDER flag is set. If the AST_MODFLAG_LOAD_ORDER flag is not set, the value will never be read and the module will be given the lowest possible priority on load. Since some modules are reliant on a timing interface, the timing modules have been given a high load priorty. (closes issue #15191) Reported by: alecdavis Tested by: dvossel Review: https://reviewboard.asterisk.org/r/262/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@199745 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29Merged revisions 159818 via svnmerge from kpfleming1-4/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r159818 | kpfleming | 2008-11-29 11:57:39 -0600 (Sat, 29 Nov 2008) | 18 lines incorporates r159808 from branches/1.4: ------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu 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 ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@159851 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-14Swap "static" and "const", so that "static" appears at the beginning of eachtilghman1-3/+3
declaration (suppresses a warning). (closes issue #13070) Reported by: gknispel_proformatique Patches: asterisk_trunk_const_static.patch uploaded by gknispel (license 261) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130697 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Bring Voicetronix driver up to date with current driverstilghman1-1/+1
(closes issue #12084) Reported by: mmickan Patches: chan_vpb.cc.diff uploaded by mmickan (license 400) module.h.diff uploaded by mmickan (license 400) vpb.conf.sample uploaded by mmickan (license 400) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104502 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02There are three instances of the module definition macros,rizzo1-33/+24
which make maintaining this file very error prone. This commit merges the embedded and !embedded versions, and fixes the C++ version. Eventually we should move to a single version of the macro. Too bad C++ doesn't like the C-style struct initializers .foo = some_value git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95771 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Move usage of the old LOCAL_USER_* macros to the new ast_module_user_* ↵file1-1/+1
functions in a few documentation places. (closes issue #11533) Reported by: IgorG Patches: oldmacroclean.v1.diff uploaded by IgorG (license 20) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92811 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22shuffle a little bit the content of header files to reduce dependencies.rizzo1-0/+53
In this commit: - move the ast_register/unregister_app functions to module.h to avoid the need to include pbx.h for the simpler apps; - move the ast_group structure to channel.h to remove the dependency of app.h on linkedlists.h Note, this is a long process that I am doing in small steps. The main difficulty is that now for each subsystem we have a single header (e.g. channel.h) included by the subsystem provider (usually one file, e.g. channel.c) and by its clients (dozens of them, e.g. we have some 70+ apps and 30+ functions). This requires the clients to include all the extra headers required by the provider (eg. lock.h, linkedlists.h, definitions of substructures...) even though many of the clients would be just happy with opaque struct declarations and function prototypes. The long term plan is to eventually rectify this structure so that the compilation can become faster, and also APIs are more stable. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89522 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20switch compile-time option checking to string storage mode in this branch tookpfleming1-5/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89463 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19Be a bit more pedantic about the type for holding the md5 sum for the build ↵russell1-1/+2
options. Also, doxygenify the comment. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89440 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Merged revisions 89325 via svnmerge from kpfleming1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89325 | kpfleming | 2007-11-16 10:47:46 -0600 (Fri, 16 Nov 2007) | 4 lines To help combat problems where people build external modules (asterisk-addons 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/trunk@89326 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-30Merged revisions 84146 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84146 | russell | 2007-09-30 16:02:16 -0400 (Sun, 30 Sep 2007) | 4 lines Fix the AST_MODULE_INFO macro for C++ modules. The load and reload parameters were in the wrong place. (closes issue #10846, alebm) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84147 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19After some study, thought, comparing, etc. I've backed out the previous ↵murf1-1/+1
universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75983 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵murf1-1/+1
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75400 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Merge a bunch of doxygen updates to header files. This includes changes torussell1-14/+18
use the \retval tag for documenting return values, fixing various warnings when generating the documentation, and various other things. (closes issue #10203, snuffy) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05Merged revisions 67308 via svnmerge from russell1-0/+7
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r67308 | russell | 2007-06-05 10:51:53 -0500 (Tue, 05 Jun 2007) | 5 lines When shutting down "gracefully", go through and run the unload() callbacks for 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/trunk@67310 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-07Constificationsoej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63240 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-22move the ast_module_info structure into the special section as well, ↵kpfleming1-1/+3
otherwise when restore_globals() is called it will lose its pointer to the ast_module structure that the loader put there git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56209 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-22give embedded modules a helping hand by backing up and restoring their ↵kpfleming1-0/+73
global variables when they are loaded and unloaded git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56092 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-30Adding dialplan function IFMODULE, so you can create dialplans that handleoej1-0/+7
various PBX installations and checks if a module is loaded before using it. example IFMODULE(chan_sip3.so) issue #6671 in the bug tracker, finally gone. Thanks to mithraen for keeping it updated. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46513 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-30Issue 8246 Doxygen updates (kshumard) oej1-2/+2
THANK YOU! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46434 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