Commit Graph

6824 Commits

Author SHA1 Message Date
Kevin P. Fleming aa7b32d175 more optimizations for embedded systems:
when LOADABLE_MODULES is off, don't export symbols from the main binary
  when LOADABLE_MODULES is off, and the compiler/linker support it, strip out code not used in the final binary


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 16:45:35 +00:00
Russell Bryant d770396e23 Identify what the columns mean in the output of "show profile"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 18:05:28 +00:00
Tilghman Lesher d2b7882788 Off by one error in buffer length (issue 7379)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 17:48:34 +00:00
Kevin P. Fleming 970c6876c5 instead of reverting this supposedly 'stupid' change, let's try to get it working properly
also eliminate a warning from dlopen() because some flags were missing on the second dlopen() call


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 16:14:00 +00:00
Russell Bryant 1ff5a0988d Merged revisions 40994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40994 | russell | 2006-08-24 15:41:26 -0400 (Thu, 24 Aug 2006) | 11 lines

Fix a few issues related to the handling of channel variables
 - in pbx_builtin_serialize_variables(), the variable list traversal would stop
   on a variables with empty name/values, which is not appropriate
 - When removing the GROUP variables, use AST_LIST_REMOVE_CURRENT instead of
   AST_LIST_REMOVE
 - During masquerading, when copying the variables list from one channel to the
   other, using AST_LIST_INSERT_TAIL is not valid for appending a whole list.
   It leaves the tail pointer of the list invalid.  Introduce a new macro,
   AST_LIST_APPEND_LIST that appends a list properly.
(issue #7802, softins)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 19:53:43 +00:00
Matthew Fredrickson 16157e26d6 Revert stupid RTLD_NOLOAD change that breaks module loading on some systems.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 17:24:33 +00:00
Joshua Colp 3f7b10eab6 Free the filename so we don't have a memory leak. (reported by PCadach in #asterisk-bugs)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 20:22:18 +00:00
Kevin P. Fleming 7eecf0bfbc use RTLD_NOLOAD if it's available to make loading dynamic modules a little 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: https://origsvn.digium.com/svn/asterisk/trunk@40949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 19:28:13 +00:00
Kevin P. Fleming e0df1dfd7c generate a message when a module cannot be found and loadable modules are disabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 23:55:16 +00:00
Kevin P. Fleming 950b3fb070 make platforms that use mutexes in stdio.h happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 23:07:11 +00:00
Kevin P. Fleming e274fc0b54 minor improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 23:06:13 +00:00
Kevin P. Fleming 804f49e2c9 when loadable modules are disabled, if someone tries to load a module that does not exist, don't dereference a NULL pointer, just stop trying to load it...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 21:57:16 +00:00
Jason Parker ec23dcb172 Solaris didn't like this.
Let's just go ahead and make this match every other uintXX_t in Asterisk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 05:34:44 +00:00
Jason Parker 0264c362b6 a couple Solaris tweaks, to help build properly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 05:24:50 +00:00
Kevin P. Fleming 26fa229138 restore 'preload' functionality in loader
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 22:23:26 +00:00
Kevin P. Fleming a394f4ad64 use a customized configure macro to tell the script that uCLinux does not have fork() that works
drop all startup options and code related to forking if it is not available


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 20:12:18 +00:00
Kevin P. Fleming ca0a1d3842 don't initialize global variables list twice
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 20:04:59 +00:00
Kevin P. Fleming 61755115c2 restore printing of module name during loading
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:56:30 +00:00
Russell Bryant 283bcf4c9f - simplify and improve astmm by using thread storage instead of a dynamic
allocation and free on every call of the function for preparing the string
  that will be appended.  Then, use the ast_dynamic_str() code instead of the
  open coded version that is appended to when waiting for it to be delivered.
- use for loops for list traversals
- convert the manager sessions list to use list macros
- use atomic operations for num_sessions and usecounts
- convert some defines to the equivalent enum


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:42:29 +00:00
Russell Bryant 389c605a67 - use the atomic operations for incrementing the unique int
- free the string fields allocation if ast_create_channel() failes to open the
  alert pipe
- formatting tweaks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:35:28 +00:00
Russell Bryant 5d3869a1c8 various cleanups, including ...
- Create an astmm_log() macro that logs the same message to both stderr as well
  as the mmlog file if it is open instead of duplicating the code everywhere.
- Use for loops for list traversals instead of while loops
- reduce nesting
- ensure locking isn't put around more than is necessary
- localize a struct definition
- change the limit of the path to the mmlog to PATH_MAX instead of 80


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:18:09 +00:00
Kevin P. Fleming 5b03b3449b use a safer process for checking if a module wants to export symbols into the global namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 14:42:03 +00:00
Kevin P. Fleming f3c518a70f don't declare these variables unless needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 03:06:41 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00