Commit Graph

77 Commits

Author SHA1 Message Date
Kevin P. Fleming 472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Luigi Rizzo 46a9459d57 remove a now useless debugging message about loading new-style modules.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 15:51:43 +00:00
Russell Bryant 04ecb29d03 remove almost all of the checks of the result from ast_strdupa() or alloca().
As it turns out, all of these checks were useless, because alloca will never
return NULL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 13:22:15 +00:00
Kevin P. Fleming 0abc9b0bd7 test commit to ensure the server is happy again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 12:29:39 +00:00
Luigi Rizzo 1f46755f75 fix a mostly harmless error introduced by svn merge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:19:57 +00:00
Luigi Rizzo e43bc6634d This rather large commit changes the way modules are loaded.
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: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 14:08:19 +00:00
Kevin P. Fleming 1dbf98061e remove extraneous warning message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 15:28:24 +00:00
Luigi Rizzo 08d6fd6e17 remove an unused function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 16:00:23 +00:00
Luigi Rizzo 68b136c263 remove unused fields
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 15:09:24 +00:00
Kevin P. Fleming 628a3e8d1b update module license key text and update loader to accept it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:37:30 +00:00
Luigi Rizzo a60d8196df small cleanups to module.h and loader.c to start playing with
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: https://origsvn.digium.com/svn/asterisk/trunk@17790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 09:10:31 +00:00
Tilghman Lesher 8a366ba988 Reduce debugging messages from WARNING to DEBUG
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-02 06:27:54 +00:00
Olle Johansson 7058495f97 Doxygen fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:55:52 +00:00
Luigi Rizzo 2326d0d499 Bring in the new loader code as described in mantis #4377
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: https://origsvn.digium.com/svn/asterisk/trunk@15784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 21:15:10 +00:00
Mark Spencer 9164eac21a Add micro-http server and abstract manager interface, make snmp not die
on reload.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 23:50:09 +00:00
Kevin P. Fleming b0ac62573a revert loader changes that have clearly not undergone adequate testing before commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 23:22:44 +00:00
Tilghman Lesher bdd24455b4 Bug 4377 - Round 2 of the loader updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 06:02:46 +00:00
Russell Bryant 5c38240187 conversions to allocation wrappers and various other coding guideliens fixes (issue #6582)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 01:37:56 +00:00
Tilghman Lesher f1209276fd Bug 4377 - Initial round of loader changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 23:08:06 +00:00
Russell Bryant 6f71e1178e constify arguments in more places where strings should not be modified (issue #6286)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 22:17:31 +00:00
Matt O'Gorman e57319b1e5 Merged revisions 8162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8162 | mogorman | 2006-01-17 18:47:04 -0600 (Tue, 17 Jan 2006) | 4 lines

Changed order of autoload so that pbx_ comes before
channels, and in doing so cause bug 6002 to not
be an issue

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 00:49:43 +00:00
Russell Bryant a725468381 update doxygen docs to specify authors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 21:18:06 +00:00
Russell Bryant ec05153ac4 convert most of the option_*'s to a single ast_flags structure. Also, fix some
formatting, remove some unnecessary casts, and other little code cleanups.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 20:40:46 +00:00
Kevin P. Fleming 2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Russell Bryant 3453e3efa5 Doxygen documentation update from oej (issue #5505)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24 20:12:06 +00:00
Kevin P. Fleming 44aff84c2e use a more generic means to decide whether we need to provide poll/dlfcn functionality (issue #5297)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-26 17:17:56 +00:00
Kevin P. Fleming 5da915dcfd update MANY more files with proper copyright/license info (thanks Ian!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14 20:46:50 +00:00
Russell Bryant 52594b6b12 fix a bunch of gcc4 warnings realted to pointer signedness
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-05 16:29:30 +00:00
Russell Bryant 32a267db40 formatting fixes (bug #4770)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-25 15:32:06 +00:00
Kevin P. Fleming f268ea2b3c make CLI output use singular/plural when appropriate (bug #4654)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-07 22:32:20 +00:00
Kevin P. Fleming 054317fb13 add support for 'early loading' modules, so that nearly all configuration files can be read from Realtime storage
add warning for when file mapping is found but the engine is not available
add warning for trying to map 'logger.conf', since it cannot be reliably mapped


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-05 22:11:43 +00:00
Kevin P. Fleming 2b8338cb52 more file version tags
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 22:12:19 +00:00
Kevin P. Fleming 0e6762dd5f remove experimental module version tags
add per-file revision tags and 'show version files' CLI command


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 20:27:51 +00:00
Kevin P. Fleming 6cbf69981d clean up module version number output
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 18:42:15 +00:00
Kevin P. Fleming 43cf15e339 add support for per-module version numbers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 18:31:29 +00:00
Kevin P. Fleming 4f299de252 major Makefile and build process improvements, including removal of all hardcoded paths (modules must now use run-time paths as they should) (bug #4116)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 03:04:58 +00:00
Kevin P. Fleming 23472dd2c0 support configurable batch posting of CDRs (off by default) (bug #3883)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-03 01:42:31 +00:00
Kevin P. Fleming 199add9567 phase 1 of header include cleanup (bug #4067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-22 13:11:34 +00:00
Kevin P. Fleming 1f9ab2380a use double-quotes instead of angle-brackets for non-system include files (bug #4058)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-21 06:02:45 +00:00
Kevin P. Fleming d254db31c8 *** empty log message ***
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-06 21:12:32 +00:00
Mark Spencer 5f726ad8c7 Merge config updates (bug #3406)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-25 06:10:20 +00:00
Russell Bryant 0c30452423 update copyright headers for 2005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-21 07:06:25 +00:00
Mark Spencer 1496da97fb Optimize module loading (bug #3356)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-16 22:59:30 +00:00
Mark Spencer ff6c09c775 Revert loader change now that we do it at runtime
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-10 22:16:42 +00:00
Mark Spencer 127c3c93d0 Load formats first (bug #3242)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-04 20:55:43 +00:00
Russell Bryant 6cd0d316e2 fix logging issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-12-27 22:41:58 +00:00
Mark Spencer a085c07f89 Don't hold modlock while doing reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-11-17 13:40:47 +00:00
Mark Spencer dffb2566bc Big agent / queue fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-11-13 22:44:33 +00:00
Mark Spencer 3e5368b763 Provide module command completion (make twisted happy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-16 21:14:05 +00:00
Mark Spencer 7c4337dc91 Add option for "show modules like" (bug #2643)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-14 04:38:29 +00:00