Commit Graph

94 Commits

Author SHA1 Message Date
Naveen Albert e26b57984f asterisk: Add macro for curl user agent.
Currently, each module that uses libcurl duplicates the standard
Asterisk curl user agent.

This adds a global macro for the Asterisk user agent used for
curl requests to eliminate this duplication.

ASTERISK-29861 #close

Change-Id: I9fc37935980384b4daf96ae54fa3c9adb962ed2d
2022-02-25 13:04:14 -06:00
Sean Bright 2473b791b9 Replace calls to strtok() with strtok_r()
strtok() uses a static buffer, making it not thread safe.

Also add a #define to cause a compile failure if strtok is used.

Change-Id: Icce265153e1e65adafa8849334438ab6d190e541
2019-03-07 16:44:50 -06:00
Corey Farrell 4d1c9d8711 core: Stop using AST_INLINE_API for allocator functions.
This replaces AST_INLINE_API allocators in utils.h with real functions
implemented in astmm.c.  Associated macro's are also moved from utils.h
to astmm.h.

Remove menuselect conflicts between MALLOC_DEBUG and DEBUG_CHAOS as they
can now be combined.

This has multiple benefits:
* Simplifies asterisk/utils.h by removing inline functions and use of
  the logger.
* Removal of these inline functions decreases size of Asterisk and
  module binaries by 1% or more.
* Puts memory management functions together with and without
  MALLOC_DEBUG enabled, simplifying management of the code.
* Enables DEBUG_CHAOS for ASTMM_REDIRECT and bundled pjproject.

Change-Id: If9df4377f74bdbb627461b27a473123e05525887
2018-03-17 01:06:33 -04:00
Richard Mudgett c711e4076a core: Remove ABI effects of MALLOC_DEBUG.
This allows asterisk to be compiled with MALLOC_DEBUG to load modules
built without MALLOC_DEBUG.  Now pre-compiled third-party modules will
still work regardless of MALLOC_DEBUG being enabled or not.

Change-Id: Ic07ad80b2c2df894db984cf27b16a69383ce0e10
2018-03-01 13:13:55 -06:00
Corey Farrell 1b80ffa495 Fix Common Typo's.
Fix instances of:
* Retreive
* Recieve
* other then
* different then
* Repeated words ("the the", "an an", "and and", etc).
* othterwise, teh

ASTERISK-24198 #close

Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
2017-12-20 12:40:01 -05:00
Corey Farrell 0bda39c668 DEBUG_FD_LEAKS: Add missing FD creators.
This adds FD tracking for the following functions:
* eventfd
* timerfd_create
* socketpair
* accept

ASTERISK-27404

Change-Id: Id6848fe904ade2d34eb39d2a20bd6b223e1111fc
2017-11-08 13:57:45 -05:00
Corey Farrell 8e36064109 core: Improve/simplify handling of required headers.
* Report failures if configure finds a required header is missing.
* Deduplicate includes between asterisk.h, astmm.h and compat.h.
* Unconditionally include headers in compat.h if required elsewhere.

Change-Id: Ie67d0185ca71fbfb81c9bdfaebe46a49e3c56dc5
2017-04-03 16:16:09 -04:00
Corey Farrell f9695dc057 Forward declare 'struct ast_json' in asterisk.h
The ast_json structure is used in many Asterisk headers and is often the
only part of json.h used.  This adds a forward declaration to asterisk.h
and removes the include of json.h from many headers.  The declaration
has been left in endpoints.h and stasis.h to avoid problems with source
files that use ast_json functions without directly including json.h.

ari.h continues to include json.h as it uses enum
ast_json_encoding_format.

Change-Id: Id766aabce6bed56626d27e8d29f559b5e687b769
2017-03-30 22:59:59 -05:00
Tzafrir Cohen 69fed26deb define PATH_MAX for HURD
PATH_MAX is not guaranteed to be defined. In parctice, all but the HURD
define it to a constant. It is indeed not safe to assume there won't be
longer paths and Asterisk generally does err safely on such cases.

So even for HURD we'll just pretend PATH_MAX is 4096.

ASTERISK-25070 #close

Change-Id: I53d10ba18c34c132bcb640a5fd8e0da1d9b22db3
2016-11-01 11:00:21 +02:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
Corey Farrell 8c5c95ad89 core: Remove ABI effects of LOW_MEMORY.
This allows asterisk to compiled with LOW_MEMORY to load modules built
without LOW_MEMORY.

ASTERISK-26398 #close

Change-Id: I24b78ac9493ab933b11087a8b6794f3c96d4872d
2016-09-29 03:22:28 -04:00
Corey Farrell 827457dca0 Produce friendly error when AST_MODULE_SELF_SYM is not defined.
Modules must define AST_MODULE_SELF_SYM to be used as the name of a
generated function.  This produces a friendly error when it's not
defined.

ASTERISK-26278 #close

Change-Id: Ib9d35a08104529c516d636771365e02c6e77a45b
2016-08-08 20:05:34 -05:00
George Joseph 8852a4c3db asterisk.c: Add auto generation and persistence of UUID
Upcoming features will require the generation and persistence
of a UUID.

Change-Id: I3ec0062427e133217db6ef496a4216f427c3b92d
2016-07-23 09:05:48 -05:00
Corey Farrell a8bfa9e104 Modules: Make ast_module_info->self available to auxiliary sources.
ast_module_info->self is often needed to register items with the core.  Many
modules have ad-hoc code to make this pointer available to auxiliary sources.
This change updates the module build process to make the needed information
available to all sources in a module.

ASTERISK-25056 #close
Reported by: Corey Farrell

Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
2015-05-04 20:47:01 -04:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
Corey Farrell 3ddd92902a Replace most uses of ast_register_atexit with ast_register_cleanup.
Since 'core stop now' and 'core restart now' do not stop modules,
it is unsafe for most of the core to run cleanups.  Originally all
cleanups used ast_register_atexit, and were only changed when it
was shown to be unsafe.  ast_register_atexit is now used only when
absolutely required to prevent corruption and close child processes.

Exceptions that need to use ast_register_atexit:
* CDR: Flush records.
* res_musiconhold: Kill external applications.
* AstDB: Close the DB.
* canary_exit: Kill canary process.

ASTERISK-24142 #close
Reported by: David Brillert

ASTERISK-24683 #close
Reported by: Peter Katzmann

ASTERISK-24805 #close
Reported by: Badalian Vyacheslav

ASTERISK-24881 #close
Reported by: Corey Farrell

Review: https://reviewboard.asterisk.org/r/4500/
Review: https://reviewboard.asterisk.org/r/4501/
........

Merged revisions 433495 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 433497 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-26 22:24:26 +00:00
Richard Mudgett e2d3215b83 HTTP: Stop accepting requests on final system shutdown.
There are three CLI commands to stop and restart Asterisk each.

1) core stop/restart now - Hangup all calls and stop or restart Asterisk.
New channels are prevented while the shutdown request is pending.

2) core stop/restart gracefully - Stop or restart Asterisk when there are
no calls remaining in the system.  New channels are prevented while the
shutdown request is pending.

3) core stop/restart when convenient - Stop or restart Asterisk when there
are no calls in the system.  New calls are not prevented while the
shutdown request is pending.

ARI has made stopping/restarting Asterisk more problematic.  While a
shutdown request is pending it is desirable to continue to process ARI
HTTP requests for current calls.  To handle the current calls while a
shutdown request is pending, a new committed to shutdown phase is needed
so ARI applications can deal with the calls until the system is fully
committed to shutdown.

* Added a new shutdown committed phase so ARI applications can deal with
calls until the final committed to shutdown phase is reached.

* Made refuse new HTTP requests when the system has reached the final
system shutdown phase.  Starting anything while the system is actively
releasing resources and unloading modules is not a good thing.

* Split the bridging framework shutdown to not cleanup the global bridging
containers when shutting down in a hurry.  This is similar to how other
modules prevent crashes on rapid system shutdown.

* Moved ast_begin_shutdown(), ast_cancel_shutdown(), and
ast_shutting_down().  You should not have to include channel.h just to
access these system functions.

ASTERISK-24752 #close
Reported by: Matthew Jordan

Review: https://reviewboard.asterisk.org/r/4399/
........

Merged revisions 431692 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-11 17:39:13 +00:00
Corey Farrell 44409401ec main/formats: Fix crash in ast_format_cmp during non-clean shutdown.
* Update asterisk.h to reflect availability of ast_register_cleanup in 11.9.
* Use ast_register_cleanup for format_attr_shutdown.

(closes issue ASTERISK-23103)
Reported by: JoshE
........

Merged revisions 411310 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 411311 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 18:26:12 +00:00
Jason Parker 7422581b6d Move channel driver Registry manager events to core.
This also shuffles the stasis system topic and related handling.

(closes issue ASTERISK-21488)

Review: https://reviewboard.asterisk.org/r/2631/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-08 14:42:57 +00:00
David M. Lee d81c846724 Avoid unnecessary cleanups during immediate shutdown
This patch addresses issues during immediate shutdowns, where modules
are not unloaded, but Asterisk atexit handlers are run.

In the typical case, this usually isn't a big deal. But the
introduction of the Stasis message bus makes it much more likely for
asynchronous activity to be happening off in some thread during
shutdown.

During an immediate shutdown, Asterisk skips unloading modules. But
while it is processing the atexit handlers, there is a window of time
where some of the core message types have been cleaned up, but the
message bus is still running. Specifically, it's still running
module subscriptions that might be using the core message types. If a
message is received by that subscription in that window, it will
attempt to use a message type that has been cleaned up.

To solve this problem, this patch introduces ast_register_cleanup().
This function operates identically to ast_register_atexit(), except
that cleanup calls are not invoked on an immediate shutdown. All of
the core message type and topic cleanup was moved from atexit handlers
to cleanup handlers.

This ensures that core type and topic cleanup only happens if the
modules that used them are first unloaded.

This patch also changes the ast_assert() when accessing a cleaned up
or uninitialized message type to an error log message. Message type
functions are actually NULL safe across the board, so the assert was a
bit heavy handed. Especially for anyone with DO_CRASH enabled.

Review: https://reviewboard.asterisk.org/r/2562/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-30 17:05:53 +00:00
Jason Parker 570d0c3139 Fix build breakage, from LOW_MEMORY fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-07 17:53:50 +00:00
Matthew Jordan 6e2fe0c9ab Clean up documentation; prevent ref leak on exit
This patch:
 * Cleans up some doxygen
 * Prevents leaking the system level Stasis topics and messages
   on exit (users of valgrind will be happier)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-04 16:00:46 +00:00
Jonathan Rose 1eac5a7988 Stasis: Convert network change events into network change stasis messages
(issue ASTERISK-21103)
Review: https://reviewboard.asterisk.org/r/2490/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-03 18:03:26 +00:00
Jason Parker 6acc9ceb76 Don't undefine bzero()/bcopy().
This was causing build failures against external libraries that happened to use
them, unless silly hacks were added to the modules that used those headers.

Review: https://reviewboard.asterisk.org/r/2359/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 21:21:50 +00:00
Andrew Latham 6c20cf2d8a Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing.  Update title that was left behind many years ago.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 14:17:40 +00:00
Kevin P. Fleming 92ef8a6fe1 Address OpenSSL initialization issues when using third-party libraries.
When Asterisk is used with various third-party libraries (CURL, PostgresSQL,
many others) that have the ability themselves to use OpenSSL, it is possible
for conflicts to arise in how the OpenSSL libraries are initialized and
shutdown. This patch addresses these conflicts by 'wrapping' the important
functions from the OpenSSL libraries in a new shared library that is part
of Asterisk itself, and is loaded in such a way as to ensure that *all*
calls to these functions will be dispatched through the Asterisk wrapper
functions, not the native functions.

This new library is optional, but enabled by default. See the CHANGES file
for documentation on how to disable it.

Along the way, this patch also makes a few other minor changes:

* Changes MODULES_DIR to ASTMODDIR throughout the build system, in order to
  more closely match what is used during run-time configuration.

* Corrects some errors in the configure script where AC_CHECK_TOOLS was used
  instead of AC_PATH_PROG.

* Adds a new variable for linker flags in the build system (DYLINK), used for
  producing true shared libraries (as opposed to the dynamically loadable
  modules that the build system produces for 'regular' Asterisk modules).

* Moves the Makefile bits that handle installation and uninstallation of the
  main Asterisk binary into main/Makefile from the top-level Makefile.

* Moves a couple of useful preprocessor macros from optional_api.h to
  asterisk.h.

Review: https://reviewboard.asterisk.org/r/1006/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 21:21:16 +00:00
Russell Bryant cc0b7e7df5 Some scheduler API cleanup and improvements.
Previously, I had added the ast_sched_thread stuff that was a generic scheduler
thread implementation.  However, if you used it, it required using different
functions for modifying scheduler contents.  This patch reworks how this is
done and just allows you to optionally start a thread on the original scheduler
context structure that has always been there.  This makes it trivial to switch
to the generic scheduler thread implementation without having to touch any of
the other code that adds or removes scheduler entries.

In passing, I made some naming tweaks to add ast_ prefixes where they were not
there before.

Review: https://reviewboard.asterisk.org/r/1007/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:15:54 +00:00
Stefan Schmidt 1482ba3057 move devices from hints into an ao2_container
by splitting up devices from hints into an own ao2_container the callback to
get these devices for statechange handling is faster.
with this changes the length of a device used in a hint isnt longer restricted
to 80 characters.

Tests showed that calling handle_statechange is 40 times faster if no hints
are used and 25 times faster if there are any hints.

(closes issue #17928)
Reported by: mdu113
Tested by: schmidts

Review: https://reviewboard.asterisk.org/r/1003/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-30 09:49:25 +00:00
Tilghman Lesher 9b005d5e25 Merged revisions 296429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r296429 | tilghman | 2010-11-27 03:58:57 -0600 (Sat, 27 Nov 2010) | 5 lines
  
  Also don't build DEBUG_FD_LEAKS when STANDALONE2 is defined.
  
  (closes issue #18385)
   Reported by: cmaj
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-27 10:00:35 +00:00
Tilghman Lesher 80973cb97f Revert attempt to standardize with _POSIX_C_SOURCE.
This did not function in the way that was intended, causing more compatibility
issues than it solved.  It is best, therefore, that it be simply removed.
(Discussed with kpfleming; agreement to remove was reached.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 03:30:42 +00:00
Michiel van Baak 6227229264 Let's compile again on OpenBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 10:50:49 +00:00
Tilghman Lesher 9f7a3466ef Various patches, to enable Asterisk to once again compile on Mac OS X.
One note on defining _POSIX_C_SOURCE:  while this feature test macro
works to require certain behaviors on Linux, it works differently on *BSD
platforms to REMOVE certain API calls that are not in the POSIX specification,
such as vasprintf(3).  Thus, defining it while depending upon vasprintf (and
other extensions to the POSIX standard) to be defined is a recipe to ensure
that Asterisk is only buildable on Linux.

Hence, this define which was meant to INCREASE portability, effectively
ensures the opposite.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-30 18:37:17 +00:00
Tilghman Lesher 8fb871b1ad Merged revisions 213559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r213559 | tilghman | 2009-08-21 11:52:53 -0500 (Fri, 21 Aug 2009) | 7 lines
  
  Permit DEBUG_FD_LEAKS to be used with C++ source files.
  (closes issue #15698)
   Reported by: slavon
   Patches: 
         20090817__issue15698.diff.txt uploaded by tilghman (license 14)
   Tested by: slavon, tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 16:53:52 +00:00
Kevin P. Fleming 0f0ad824f0 Relax check for XOPEN_VERSION.
It's not clear that we actually require XOPEN_VERSION to be 600 or greater
at this time, so skip the check for now.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 20:40:24 +00:00
Kevin P. Fleming 4222e1c367 Define our desires for POSIX and X/OPEN API features properly.
Based on a post on the gcc-help mailing list and some subsequent reading,
we can increase our portability to various platforms by directly defining
the POSIX and X/OPEN API feature sets we wish to have available. This patch
does that, and also includes a double-check to ensure that the system
we are compiling on can actually provide the requested feature sets.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 16:25:10 +00:00
Tilghman Lesher 8f28bfc63e Merged revisions 187300-187301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r187300 | tilghman | 2009-04-08 23:31:38 -0500 (Wed, 08 Apr 2009) | 3 lines
  
  Add debugging mode for diagnosing file descriptor leaks.
  (Related to issue #14625)
........
  r187301 | tilghman | 2009-04-08 23:32:40 -0500 (Wed, 08 Apr 2009) | 2 lines
  
  Oops, missed this file in the last commit.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 04:59:05 +00:00
Tilghman Lesher be40f3a33c Merge changes from str_substitution that are unrelated to that branch.
Included is a small bugfix to an ast_str helper, but most of these changes
are simply doxygen fixes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 20:13:28 +00:00
Sean Bright e1f941d7f6 Mostly just whitespace, but also convert 'CVS' to 'SVN' in a couple
places and fix a few typos I found in the CODING_GUIDELINES.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 23:07:14 +00:00
Michiel van Baak c8c8995b70 add tab completion for 'core set debug X filename.c'
(closes issue #13969)
Reported by: jtodd
Patches:
      20081205__bug13969.diff.txt uploaded by Corydon76 (license 14)
Tested by: mvanbaak, eliel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 17:09:15 +00:00
Sean Bright 7add06a4d6 Fix a problem found while building res_snmp.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 22:01:22 +00:00
Sean Bright 1dedb785ab Don't include logger.h in asterisk.h by default as it is causing problems building
app_voicemail.  Instead, include it where it is needed.  This turned out to be a
relatively minor issue because other headers include logger.h as well.

Need to test -addons before merging this back to 1.6.0.

(closes issue #13605)
Reported by: tomo1657
Patches: 
      13605_seanbright.diff uploaded by seanbright (license 71)
Tested by: mmichelson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 00:42:13 +00:00
Steve Murphy e235a07376 (closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 14:17:33 +00:00
Kevin P. Fleming 629861a705 Merged revisions 144924-144925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r144924 | kpfleming | 2008-09-27 10:00:48 -0500 (Sat, 27 Sep 2008) | 6 lines
  
  improve header inclusion process in a few small ways:
  
    - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose
    - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled
    - simplify the usage of some of these headers in the AEL-related stuff in the utils directory
........
  r144925 | kpfleming | 2008-09-27 10:13:30 -0500 (Sat, 27 Sep 2008) | 2 lines
  
  fix some minor issues with rev 144924
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 15:52:56 +00:00
Russell Bryant 7258c132bd These prototypes are not supposed to be in asterisk.h. They are already in
version.h.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:54:01 +00:00
Steve Murphy 71ad27409c The fixes in this commit are mainly to allow compiling of trunk with --enable-dev-mode, mutex profiling, lock debugging, etc. Mainly, the version.c needs to be in the OBJS line; asterisk.h was chosen to have the prototypes for ast_get_version, ast_get_version_num; and the ASTERISK_FILE_VERSION macro needs to be used after including asterisk.h in a few files. I hope I did the right thing. If not, let me know.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:50:39 +00:00
Olle Johansson a30972ee65 More "moremanager" fixes. Manager commands to check module status.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 21:04:29 +00:00
Luigi Rizzo 51391e6b09 shuffle a little bit the content of header files to reduce dependencies.
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: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 03:50:04 +00:00
Kevin P. Fleming 3826d15993 move these forward declarations back to asterisk.h where they belong... even though asterisk.h includes compat.h, these declarations have nothing to do with the being platform-compatible and are directly related to being part of Asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 16:07:11 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo 915b97d300 move internal function declarations to include/asterisk/_private.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 22:18:21 +00:00