aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk.c
AgeCommit message (Collapse)AuthorFilesLines
2008-07-26Add the licensing section to the docs in 1.4, as well, so that we can work onrussell1-8/+1
having an accurate list for each version of Asterisk that is supported git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133980 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-23make some more changes to the dahdi/zap channel name support stuff to ensure ↵kpfleming1-10/+12
allthe globals are 'const', and clean up mmichelson's changes to app_chanspy to simplify the code git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133226 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-23As suggested by seanbright, the PSEUDO_CHAN_LEN in mmichelson1-0/+6
app_chanspy should be set at load time, not at compile time, since dahdi_chan_name is determined at load time. Also changed the next_unique_id_to_use to have the static qualifier. Also added the dahdi_chan_name_len variable so that strlen(dahdi_chan_name) isn't necessary. Thanks to seanbright for the suggestion. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133169 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-22fix up namespace pollution for dahdi_chan_mode enumkpfleming1-4/+4
correct registration of AMI actions in chan_dahdi; in zap-only mode, only register the Zap flavors of the actions (and use Zap prefixes for headers and acks), but in dahdi+zap mode, register both Zap and DAHDI flavors of actions git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@132787 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11a whole pile of Zaptel/DAHDI compatibility work, with lots more to come... ↵kpfleming1-4/+22
this tree is not yet ready for users to be easily upgrading or switching, but it needs to be :-) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@130298 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19The RDTSC instruction was introduced on the Pentium line of microprocessors,tilghman1-1/+4
and is not compatible with certain 586 clones, like Cyrix. Hence, asking for i386 compatibility was always incorrect. See http://en.wikipedia.org/wiki/RDTSC (Closes issue #12886) Reported by tecnoxarxa git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@123869 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff ↵jpeeler1-3/+36
should continue working. Release announcement to follow. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122314 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27NULL character should terminate only commands back to the core, not logtilghman1-7/+14
messages to the console. (closes issue #12731) Reported by: seanbright Patches: 20080527__bug12731.diff.txt uploaded by Corydon76 (license 14) Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118465 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22Also remove preamble from asynchronous events (reported by jsmith on ↵tilghman1-0/+9
#asterisk-dev) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117899 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Strip the preamble from the output also when -rx is not being usedtilghman1-0/+8
(Related to issue #12702) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117519 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Don't filter the magic character in the network verboser. It gets filteredrussell1-3/+0
once it reaches the client. (related to issue #12702, pointed out by tilghman) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117514 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-211) Don't print the verbose marker in front of every message from ast_verbose()russell1-0/+3
being sent to remote consoles. 2) Fix pbx_gtkconsole to filter out the verbose marker. (related to issue #12702) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117507 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Don't display the verbose marker for calls to ast_verbose() that do not includerussell1-1/+5
a VERBOSE_PREFIX in front of the message. (closes issue #12702) Reported by: johnlange Patched by me git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117479 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-13If the socket dies (read returns 0=EOF), return immediately.tilghman1-1/+1
(Closes issue #12637) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115884 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-06Don't print the terminating NUL. (Closes issue #12589)tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115415 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-05Separate verbose output from CLI output, by using a preamble.tilghman1-3/+35
(closes issue #12402) Reported by: Corydon76 Patches: 20080410__no_verbose_in_rx_output.diff.txt uploaded by Corydon76 (license 14) 20080501__no_verbose_in_rx_output__1.4.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115333 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-08Work around some silliness caused by sys/capability.h - this should fix ↵qwell1-5/+6
compile errors a number of users have been experiencing. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@113402 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-04One thing at a time... let's get 1.4 building.file1-1/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@112709 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-03add a Zaptel timer check to verify the timer is responding when Zaptel ↵dhubbard1-1/+29
support is compiled into Asterisk and Zaptel drivers are loaded. This will help people not waste their valuable time debugging side effects. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@112689 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-25Add an option (transmit_silence) which transmits silence during both ↵file1-2/+2
Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases. (closes issue #10058) Reported by: tracinet git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@110628 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Safely use the strncat() function.tilghman1-2/+3
(closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106552 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-03Merge in some changes from team/russell/autoservice-nochans-1.4russell1-0/+2
These changes fix up some dubious code that I came across while auditing what happens in the autoservice thread when there are no channels currently in autoservice. 1) Change it so that autoservice thread doesn't keep looping around calling ast_waitfor_n() on 0 channels twice a second. Instead, use a thread condition so that the thread properly goes to sleep and does not wake up until a channel is put into autoservice. This actually fixes an interesting bug, as well. If the autoservice thread is already running (almost always is the case), then when the thread goes from having 0 channels to have 1 channel to autoservice, that channel would have to wait for up to 1/2 of a second to have the first frame read from it. 2) Fix up the code in ast_waitfor_nandfds() for when it gets called with no channels and no fds to poll() on, such as was the case with the previous code for the autoservice thread. In this case, the code would call alloca(0), and pass the result as the first argument to poll(). In this case, the 2nd argument to poll() specified that there were no fds, so this invalid pointer shouldn't actually get dereferenced, but, this code makes it explicit and ensures the pointers are NULL unless we have valid data to put there. (related to issue #12116) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105563 f38db490-d61c-443f-a65b-d21fe96a405b
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