aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-18Backport fix from issue #9325.file1-2/+3
(closes issue #11980) Reported by: rbrunka git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103768 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12revert accidental change from last commit. oopsqwell1-3/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103504 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12Remove condition that was impossible.qwell1-2/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103503 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-04Cross-platform fix: OS X now deprecates the use of the daemon(3) API.tilghman1-0/+4
(closes issue #11908) Reported by: oej Patches: 20080204__bug11908.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102323 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-24Update main Asterisk copyright info to 2008russell1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100164 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Backport the ability to set the ToS bits on Linux when not running as root.russell1-5/+26
Normally, we would not backport features into 1.4, but, I was convinced by the justification supplied by the supplier of this patch. He pointed out that this patch removes a requirement for running as root, thus reducing the potential impacts of security issues. (closes issue #11742) Reported by: paravoid Patches: libcap.diff uploaded by paravoid (license 200) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98265 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-08Apply multiple crash fixes, found in issue #11386, but not completelytilghman1-3/+3
closing that issue. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97077 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21Fix for restart-as-user problem reported via the -dev listtilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94418 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-17When runuser/rungroup is specified, a remote console could only be attained ↵tilghman1-10/+12
by root (Closes issue #9999) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86066 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15Make sure remote consoles unmute themselves again after reconnecting.russell1-0/+4
(closes issue #10847) Reported by: atis Patches: console_unmute_on_reconnect.patch uploaded by atis (license 242) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85545 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-13Fix an issue with console verbosity when running asterisk -rx to execute a ↵russell1-10/+14
command and retrieve its output. The issue was that there was no way for the main Asterisk process to know that the remote console was connecting in the -rx mode. The way that James has fixed this is to have all remote consoles muted by default. Then, regular remote consoles automatically execute a CLI command to unmute themselves when they first start up. (closes issue #10847) Reported by: atis Patches: asterisk-consolemute.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85533 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-13Properly handle the case where read() may return the text for more than onerussell1-1/+1
CLI command at once for a remote console. (closes issue #10888) Reported by: jamesgolovich Patches: asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85532 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20When daemonizing, don't change working directory to "/". It makes it not berussell1-1/+1
able to do a core dump when not running as uid=root. (closes issue #10766, xrg) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-13Only compile in tracking astobj2 statistics if dev-mode is enabled. Also, whenrussell1-0/+2
dev mode is enabled, register the CLI command that can be used to run the astobj2 test and print out statistics. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82337 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12Clean up the output of "asterisk -h". This tweaks the wording and wraps linesrussell1-4/+6
at 80 characters. (closes issue #10699, seanbright) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82280 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-08Fix a small memory leak. ast_unregister_atexit() did not free the entry it ↵russell1-8/+15
removed. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81997 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27Merged revisions 72373 via svnmerge from bbryant1-0/+7
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: http://svn.digium.com/svn/asterisk/branches/1.4@72383 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27Merged revisions 72333 via svnmerge from bbryant1-7/+0
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: http://svn.digium.com/svn/asterisk/branches/1.4@72335 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27Merged revisions 72259 via svnmerge from bbryant1-0/+8
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: http://svn.digium.com/svn/asterisk/branches/1.4@72260 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-24Merged revisions 71358 via svnmerge from russell1-10/+5
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: http://svn.digium.com/svn/asterisk/branches/1.4@71362 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 71064 via svnmerge from bbryant1-5/+10
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: http://svn.digium.com/svn/asterisk/branches/1.4@71066 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14use ast_localtime() in every place localtime_r() was being usedkpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05When shutting down "gracefully", go through and run the unload() callbacks forrussell1-0/+4
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: http://svn.digium.com/svn/asterisk/branches/1.4@67308 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-30Merged revisions 62368 via svnmerge from file1-2/+2
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: http://svn.digium.com/svn/asterisk/branches/1.4@62369 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09Merged revisions 60849 via svnmerge from tilghman1-8/+6
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: http://svn.digium.com/svn/asterisk/branches/1.4@60850 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-26Allow both of the show version files and core show file versions CLI ↵file1-4/+81
commands to work. (issue #9135 reported by mvanbaak) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56783 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-23Merged revisions 56504 via svnmerge from russell1-22/+48
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: http://svn.digium.com/svn/asterisk/branches/1.4@56505 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Clarify a restart message. It's silly, but the reporter had a very valid point.qwell1-1/+1
Issue 9079 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54886 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-01Add missing 'F' letter to getopt so it magically becomes a valid option. ↵file1-1/+1
(issue #8960 reported by tzafrir) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53072 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-30Merged revisions 52903 via svnmerge from russell1-4/+17
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: http://svn.digium.com/svn/asterisk/branches/1.4@52904 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-19Merged revisions 51300 via svnmerge from russell1-0/+2
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: http://svn.digium.com/svn/asterisk/branches/1.4@51302 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-15re-add deprecated "show version" CLI command.qwell1-1/+16
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50921 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04add support for tracking thread-local-storage objects that exist via ↵kpfleming1-0/+3
'threadstorage' CLI commands git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49553 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-27since these variables all have static duration, none of them need ↵kpfleming1-8/+8
initializers (they default to zero anyway) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49006 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-27move extern declaration for this option to a header file where it belongskpfleming1-2/+0
provide an initial value for 'languageprefix' option, instead of relying on randomness to provide a useful value git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48998 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-09revert the previous change, which actually modified the deprecated command,russell1-12/+12
"show profile". Now, actually apply the change to "core show profile". git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47370 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-09Fix argument parsing for the "core show profile" CLI commandrussell1-6/+6
(fixed by rizzo in his branch, team/rizzo/astobj2) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47369 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-09fix "core show version" to reflect the new number of arguments for thisrussell1-1/+1
CLI command (issue #8316, kshumard) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47352 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-04Really fix the "core set debug" and "core set verbose" CLI commands.russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47195 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02Reverse change of "show" to "list" and make several other commands more ↵tilghman1-14/+14
consistent with "category verb arguments" git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47051 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-30Issue #8246 - Doxygen fixes from kshumard. oej1-1/+1
An extra big thankyou is given to everyone that contributes to doxygen! THANK YOU! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46433 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-27We should always be using _exit() after a fork() or vfork() instead of exit().russell1-1/+1
This is because exit() does some extra cleanup which in some implementations of vfork(), for example, can actually modify the state of the parent process, causing very weird bugs or crashes. (issue #7971, Nick Gavrikov) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46363 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18Don't modify things if we are using vfork as this is very bad and may cause ↵file1-0/+4
unexpected behavior (issue #7970 reported by Nick Gavrikov) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@45595 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04update thread creation code a bitkpfleming1-4/+4
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44378 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04ensure that local include files are always usedkpfleming1-1/+1
avoid a duplicate function name (term_init()) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44322 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-29Fix a bug with the removal of 'atleast' argument to 'core verbose' and 'core ↵qwell1-2/+2
debug'. Add that argument back in. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44053 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-26(This was actually BE-65)russell1-13/+11
Merged revisions 43708 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r43708 | russell | 2006-09-26 16:49:21 -0400 (Tue, 26 Sep 2006) | 7 lines Back in revision 4798, this message was changed from using ast_cli() to directly calling write(). During this change, checking if this was a remote console was removed. This caused this message about using "exit" or "quit" to exit an Asterisk console to come up in times where it did not make sense. This change restores the check to see if this is a remote console before printing the message. (fixes BE-4) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@43710 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19similar patch for verbose vs debug with minor changesmogorman1-1/+1
bug 2617 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18always use fork() when availablekpfleming1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43216 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-37/+128
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b