summaryrefslogtreecommitdiff
path: root/include/asterisk.h
AgeCommit message (Collapse)Author
2017-03-30Forward declare 'struct ast_json' in asterisk.hCorey Farrell
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
2016-11-01define PATH_MAX for HURDTzafrir Cohen
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-08-02asterisk.c: Add auto generation and persistence of UUIDGeorge Joseph
Upcoming features will require the generation and persistence of a UUID. Change-Id: I3ec0062427e133217db6ef496a4216f427c3b92d
2016-01-05asterisk.h: Add ASTERISK_REGISTER_FILE macroGeorge Joseph
The 11/13 branches and master use 2 different file version macros. 11/13 uses ASTERISK_FILE_VERSION but master uses ASTERISK_REGISTER_FILE. This means a new file added to 11/13 can't just be cherry-picked to master because the macro has to be changed. To make cherry-picking possible, ASTERISK_REGISTER_FILE was added to asterisk.h as a simple alias for ASTERISK_FILE_VERSION(__FILE__, NULL) The "$Revision$" tag doesn't do anything since Asterisk moved to git so just passing NULL as the verison works fine. asterisk.h was also annotated to deprecate ASTERISK_FILE_VERSION and suggest using ASTERISK_REGISTER_FILE for all new files. Finally, 2 recent file additions, pbx_builtins.c and pbx_functions.c, were modified to use the new macro to make sure it actually worked. 'core show file version' showed the correct output. Change-Id: I5867ed898818d26ee49bb6e5c7d4c1a45d4789a5
2015-04-13git migration: Remove support for file versionsMatt Jordan
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: * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Alter the "core show file version" CLI command such that it always reports the version of Asterisk. The file version is no longer available. * main/manager: The Version key now always reports the Asterisk version. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action. - Modification of the "core show file version" CLI command. Change-Id: Ia932d3c64cd18a14a3c894109baa657ec0a85d28
2015-03-26Replace most uses of ast_register_atexit with ast_register_cleanup.Corey Farrell
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-11HTTP: Stop accepting requests on final system shutdown.Richard Mudgett
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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27main/formats: Fix crash in ast_format_cmp during non-clean shutdown.Corey Farrell
* 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
2013-07-08Move channel driver Registry manager events to core.Jason Parker
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-05-30Avoid unnecessary cleanups during immediate shutdownDavid M. Lee
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-07Fix build breakage, from LOW_MEMORY fix.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-04Clean up documentation; prevent ref leak on exitMatthew Jordan
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-03Stasis: Convert network change events into network change stasis messagesJonathan Rose
(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-02-28Don't undefine bzero()/bcopy().Jason Parker
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
2012-10-18Doxygen Updates - Title updateAndrew Latham
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-01-30Address OpenSSL initialization issues when using third-party libraries.Kevin P. Fleming
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
2010-12-20Some scheduler API cleanup and improvements.Russell Bryant
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-11-30move devices from hints into an ao2_containerStefan Schmidt
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-27Merged revisions 296429 via svnmerge from Tilghman Lesher
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
2009-09-03Revert attempt to standardize with _POSIX_C_SOURCE.Tilghman Lesher
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-02Let's compile again on OpenBSDMichiel van Baak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-30Various patches, to enable Asterisk to once again compile on Mac OS X.Tilghman Lesher
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-21Merged revisions 213559 via svnmerge from Tilghman Lesher
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-17Relax check for XOPEN_VERSION.Kevin P. Fleming
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-17Define our desires for POSIX and X/OPEN API features properly.Kevin P. Fleming
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-04-09Merged revisions 187300-187301 via svnmerge from Tilghman Lesher
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-01Merge changes from str_substitution that are unrelated to that branch.Tilghman Lesher
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
2008-12-31Mostly just whitespace, but also convert 'CVS' to 'SVN' in a coupleSean Bright
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-10add tab completion for 'core set debug X filename.c'Michiel van Baak
(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-11-05Fix a problem found while building res_snmp.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10Don't include logger.h in asterisk.h by default as it is causing problems ↵Sean Bright
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-09(closes issue #13557)Steve Murphy
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-09-27Merged revisions 144924-144925 via svnmerge from Kevin P. Fleming
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-01-10These prototypes are not supposed to be in asterisk.h. They are already inRussell Bryant
version.h. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10The fixes in this commit are mainly to allow compiling of trunk with ↵Steve Murphy
--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
2007-11-27More "moremanager" fixes. Manager commands to check module status.Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22shuffle a little bit the content of header files to reduce dependencies.Luigi Rizzo
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-21move these forward declarations back to asterisk.h where they belong... even ↵Kevin P. Fleming
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-20move asterisk/paths.h outside asterisk.h and into those filesLuigi Rizzo
who really need it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20move internal function declarations to include/asterisk/_private.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19move the declaration of struct ast_channel ast_frame and ast_moduleLuigi Rizzo
to compat.h so it is always available - hopefully this will let us reduce the number of inclusions of channel.h and frame.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyLuigi Rizzo
were included almost everywhere. Remove some of the instances. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16paths are already in include/asterisk/paths.h so don't duplicateLuigi Rizzo
them in include/asterisk.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13Merged revisions 82337 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82337 | russell | 2007-09-13 13:45:59 -0500 (Thu, 13 Sep 2007) | 4 lines Only compile in tracking astobj2 statistics if dev-mode is enabled. Also, when dev mode is enabled, register the CLI command that can be used to run the astobj2 test and print out statistics. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23(closes issue #10271)Russell Bryant
Reported by: snuffy Patches: doxygen-updates.diff uploaded by snuffy (license 35) Another big batch of doxygen documentation updates git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-01Merge major changes to the way device state is passed around Asterisk. The twoRussell Bryant
places that cared about device states were app_queue and the hint code in pbx.c. The changes include converting it to use the Asterisk event system, as well as other efficiency improvements. * app_queue: This module used to register a callback into devicestate.c to monitor device state changes. Now, it is just a subscriber to Asterisk events with the type, device state. * pbx.c hints: Previously, the device state processing thread in devicestate.c would call ast_hint_state_changed() each time the state of a device changed. Then, that code would go looking for all the hints that monitor that device, and call their callbacks. All of this blocked the device state processing thread. Now, the hint code is a subscriber of Asterisk events with the type, device state. Furthermore, when this code receives a device state change event, it queues it up to be processed by another thread so that it doesn't block one of the event processing threads. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04- Add manager command CoreSettingsOlle Johansson
- Add missing option to options.h - Add missing variables to asterisk.h - Move manager version to manager.h include file git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-28Merge changes from team/russell/eventsRussell Bryant
This set of changes introduces a new generic event API for use within Asterisk. I am still working on a way for events to be shared between servers, but this part is ready and can already be used inside of Asterisk. This set of changes introduces the first use of the API, as well. I have restructured the way that MWI (message waiting indication) is handled. It is now event based instead of polling based. For example, if there are a bunch of SIP phones subscribed to mailboxes, then chan_sip will not have to constantly poll the mailboxes for changes. app_voicemail will generate events when changes occur. See UPGRADE.txt and CHANGES for some more information on the effects of these changes from the user perspective. For developer information, see the text in include/asterisk/event.h. As always, additional feedback is welcome on the asterisk-dev mailing list. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09Merged revisions 60850 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r60850 | tilghman | 2007-04-08 22:01:12 -0500 (Sun, 08 Apr 2007) | 10 lines Merged revisions 60849 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60849 | tilghman | 2007-04-08 21:49:06 -0500 (Sun, 08 Apr 2007) | 2 lines Don't check for error when lowering priority (according to the manpage, it should never happen anyway). It might could happen, though, if another thread messed with the priority, so safeguard against that (reported via -dev list). ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04Merged revisions 49553 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49553 | kpfleming | 2007-01-04 16:51:01 -0600 (Thu, 04 Jan 2007) | 2 lines add support for tracking thread-local-storage objects that exist via 'threadstorage' CLI commands ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49578 65c4cc65-6c06-0410-ace0-fbb531ad65f3