summaryrefslogtreecommitdiff
path: root/main/asterisk.c
AgeCommit message (Collapse)Author
2007-06-27Merged revisions 72383 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72383 | bbryant | 2007-06-27 18:29:14 -0500 (Wed, 27 Jun 2007) | 11 lines Merged revisions 72373 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72373 | bbryant | 2007-06-27 18:22:13 -0500 (Wed, 27 Jun 2007) | 3 lines Reinstating patch. This actually fixes the problem, however I was running a development branch without it and mistakenly thought it wasn't fixed. Fixes issue #10010, and #9654: 100% CPU usage caused by an asterisk console losing it's controlling terminal. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27Merged revisions 72335 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72335 | bbryant | 2007-06-27 18:03:01 -0500 (Wed, 27 Jun 2007) | 10 lines Merged revisions 72333 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72333 | bbryant | 2007-06-27 17:58:53 -0500 (Wed, 27 Jun 2007) | 2 lines Reverted changes for earlier revisions 72259 to 72261. Issue #9654, #10010 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27Merged revisions 72260 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72260 | bbryant | 2007-06-27 15:46:12 -0500 (Wed, 27 Jun 2007) | 12 lines Merged revisions 72259 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72259 | bbryant | 2007-06-27 15:43:53 -0500 (Wed, 27 Jun 2007) | 4 lines Fixes 100% load when controlling terminal disappears. Issue #9654, #10010 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24Merged revisions 71362 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71362 | russell | 2007-06-24 15:06:31 -0500 (Sun, 24 Jun 2007) | 10 lines Merged revisions 71358 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71358 | russell | 2007-06-24 15:04:21 -0500 (Sun, 24 Jun 2007) | 2 lines Revert the patch from issue 9654 due to an unexpected side effect ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22Merged revisions 71066 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71066 | bbryant | 2007-06-22 09:53:08 -0500 (Fri, 22 Jun 2007) | 18 lines Merged revisions 71064 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71064 | bbryant | 2007-06-22 09:39:34 -0500 (Fri, 22 Jun 2007) | 10 lines Fixed infinite loop when controlling terminal was lost and return value of input function wasn't checked for errors. This would cause 100% cpu to be taken up. (closes issue #9654, issue #10010) Reported by: mnicholson, and eserra Idea for the patch from mnicholson, patched by me ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22Nothing to see here.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18Few more rwlist conversions... why not.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Convert uses of strdup() to ast_strdup()Russell Bryant
(issue #9983, eliel) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Merged revisions 69392 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r69392 | kpfleming | 2007-06-14 16:50:40 -0500 (Thu, 14 Jun 2007) | 2 lines use ast_localtime() in every place localtime_r() was being used ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.Russell Bryant
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-08Minor formatting change to test changes to mantis auto-closing issuesRussell Bryant
(closes issue #6000) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵Tilghman Lesher
guidelines changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05Merged revisions 67308 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@67310 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-24Add a new API call for creating detached threads. Then, go replace all of theRussell Bryant
places in the code where the same block of code for creating detached threads was replicated. (patch from bbryant) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11oops.. Fix the logic of the last commit.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11Better fallback method for autosystemname.Jason Parker
Issue 9713, patch by Juggie with minor mods by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11Add autosystemname setting to asterisk.confJason Parker
When enabled, it will set the systemname to be the hostname of the system Issue 9713, patch by Juggie - slightly modified by me, to "failover" to localhost git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30Merged revisions 62369 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r62369 | file | 2007-04-30 11:36:11 -0300 (Mon, 30 Apr 2007) | 10 lines Merged revisions 62368 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r62368 | file | 2007-04-30 11:34:07 -0300 (Mon, 30 Apr 2007) | 2 lines Update copyright notice. It's now the year 2007! ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62370 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-11fixed the '-e' command line option for minmemfree. updated ↵Dwayne M. Hubbard
doc/asterisk-conf.tex git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11changed #if HAVE_SYSINFO to #if defined(HAVE_SYSINFO)Dwayne M. Hubbard
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11added HAVE_SYSINFO preprocessor directives for portability and general happinessDwayne M. Hubbard
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11added option_minmemfree for use in asterisk.conf to specify the amount of ↵Dwayne M. Hubbard
minimum free memory prior to accepting calls. added CLI 'core show sysinfo' to display system information git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61539 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-03-11grammatical errors are bad, mmmkay?Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-11Add CLI command "marko show birthday" to show "birthday information"Jason Parker
for Mark Spencers upcoming 30th birthday. To enable, run `make menuselect` and select the option MARKO_BDAY under Compiler Flags. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26Merged revisions 56783 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r56783 | file | 2007-02-26 11:36:08 -0500 (Mon, 26 Feb 2007) | 2 lines Allow both of the show version files and core show file versions CLI commands to work. (issue #9135 reported by mvanbaak) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26Remove redundant check to ensure that LOW_MEMORY is not defined.Russell Bryant
(issue #9136, mvanbaak) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-23Merged revisions 56505 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r56505 | russell | 2007-02-23 17:24:18 -0600 (Fri, 23 Feb 2007) | 16 lines Merged revisions 56504 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r56504 | russell | 2007-02-23 17:20:55 -0600 (Fri, 23 Feb 2007) | 8 lines Fix up a couple more signal handlers to not do bad things that could cause various undesirable results. The other day, I made Asterisk deadlock by hitting Control-C because of a bad signal handler. Now, signal handlers just set a flag and write to an alert pipe for the flag to be handled. Then, there is another thread that is monitoring for these flags. If being run in console mode, it is just the main thread. If Asterisk is in the background, a thread is created to do it. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16Merged revisions 54886 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r54886 | qwell | 2007-02-16 11:25:21 -0600 (Fri, 16 Feb 2007) | 4 lines Clarify a restart message. It's silly, but the reporter had a very valid point. Issue 9079 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14Show version in "core show settings"Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14New CLI command "Core show settings" to list some core settingsOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13Use spaces instead of tabs in the help text for a CLI commandRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13Simplify WELCOME_MESSAGE to be a single function call instead of one for eachRussell Bryant
line. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13- Constify the format string passed to ast_cli()Russell Bryant
- Simplify printing out the warranty and license git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01Merged revisions 53072 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r53072 | file | 2007-02-01 13:33:33 -0600 (Thu, 01 Feb 2007) | 2 lines Add missing 'F' letter to getopt so it magically becomes a valid option. (issue #8960 reported by tzafrir) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30Merged revisions 52904 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r52904 | russell | 2007-01-30 11:19:39 -0600 (Tue, 30 Jan 2007) | 17 lines Merged revisions 52903 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r52903 | russell | 2007-01-30 11:12:04 -0600 (Tue, 30 Jan 2007) | 9 lines The SIGHUP handler was implemented to allow admins to send SIGHUP to a running Asterisk process to reload the configuration. However, doing the actual reload in the signal handler itself is a very bad thing to do, because the reload process includes calling non-reentrant functions such as malloc/calloc/etc. If Asterisk is running in the background, then the reload will happen immediately. However, if running in console mode, the reload doesn't work until something is typed at the console. That sort of defeats the purpose, but I don't see an easy way to get around it at this point. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23Cosmetic changes. Make main source files better conform to coding guidelines ↵Joshua Colp
and standards. (issue #8679 reported by johann8384) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19Merged revisions 51302 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r51302 | russell | 2007-01-19 10:56:17 -0600 (Fri, 19 Jan 2007) | 12 lines Merged revisions 51300 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r51300 | russell | 2007-01-19 10:44:09 -0600 (Fri, 19 Jan 2007) | 4 lines Fix a memory leak on command line tab completion. The container for the matches was freed, but the individual matches themselves were not. (issue #8851, arkadia) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51303 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
2006-12-27Merged revisions 49006 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49006 | kpfleming | 2006-12-27 16:06:56 -0600 (Wed, 27 Dec 2006) | 2 lines since these variables all have static duration, none of them need initializers (they default to zero anyway) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27apparently we need an explicit message to warn peopleKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27make the 'languageprefix' option default to on, and deprecate turning it offKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27Merged revisions 48998 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r48998 | kpfleming | 2006-12-27 15:08:30 -0600 (Wed, 27 Dec 2006) | 3 lines move extern declaration for this option to a header file where it belongs provide an initial value for 'languageprefix' option, instead of relying on randomness to provide a useful value ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06Constify a bunch of the usage strings for CLI commands.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-22Add support to set the maximum number of files open when Asterisk loads ↵Joshua Colp
using the 'maxfiles' configuration option. (issue #7499 reported by rkarlsba) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09Merged revisions 47352 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47352 | russell | 2006-11-09 01:31:37 -0500 (Thu, 09 Nov 2006) | 3 lines fix "core show version" to reflect the new number of arguments for this CLI command (issue #8316, kshumard) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07fix "core show profile" parsing.Luigi Rizzo
Needs to go in 1.4 too, but ENOTIME now git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04Merged revisions 47195 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47195 | russell | 2006-11-04 12:59:39 -0500 (Sat, 04 Nov 2006) | 2 lines Really fix the "core set debug" and "core set verbose" CLI commands. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47197 65c4cc65-6c06-0410-ace0-fbb531ad65f3