aboutsummaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
2008-02-27Two fixes:mmichelson1-5/+31
1. Make the list of ast_dial_channels a lockable list. This is because in some cases, the ast_dial may exist in multiple threads due to asynchronous execution of its application, and I found some cases where race conditions could exist. 2. Check in ast_dial_join to be sure that the channel still exists before attempting to lock it, since it could have gotten hung up but the is_running_app flag on the ast_dial_channel may not have been cleared yet. (closes issue #12038) Reported by: jvandal Patches: 12038v2.patch uploaded by putnopvut (license 60) Tested by: jvandal git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104841 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Bump a couple of more buffers up by 2 so that annoying warnings aren't generatedmmichelson1-2/+2
like crazy on every fileexists_core call. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104783 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Ensure the session ID can't be 0.tilghman1-1/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104704 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Bump up the buffer by 2.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104665 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27Use the lock (which already existed, it just wasn't used) on the updaters ↵file1-6/+6
list to protect the contents instead of the overall module list lock. (closes issue #12080) Reported by: ChaseVenters git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104596 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-27fallback to standard English prompts properly when using new prompt ↵kpfleming1-14/+22
directory layout (closes issue #11831) Reported by: IgorG Patches: fallbacken.v1.diff uploaded by IgorG (license 20) (modified by me to improve code and conform rest of function to coding guidelines) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104593 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25Improve the lock tracking code a bit so that a bunch of old locks that threadsrussell1-1/+10
failed to lock don't sit around in the history. When a lock is first locked, this checks to see if the last lock in the list was one that was failed to be locked. If it is, then that was a lock that we're no longer sitting in a trylock loop trying to lock, so just remove it. (inspired by issue #11712) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104102 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25Allow the use of #include and #exec in situations where the max include ↵qwell1-1/+2
depth was only 1. Specifically, this fixes using #include and #exec in extconfig.conf. This was basically caused because the config file itself raises the include level to 1. I opted not to raise the include limit, because recursion here could cause very bizarre behavior. Pointed out, and tested by jmls (closes issue #12064) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104092 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-21reduce the likelihood that HTTP Manager session ids will consist of ↵kpfleming1-1/+1
primarily '1' bits git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104015 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-20Compat fix for Solaristilghman1-0/+2
(closes issue #12022) Reported by: asgaroth Patches: 20080219__bug12022.diff.txt uploaded by Corydon76 (license 14) Tested by: asgaroth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103845 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Ensure that emulated DTMFs do not get interrupted by another begin frame.file1-1/+1
(closes issue #11740) Reported by: gserra Patches: v1-11740.patch uploaded by dimas (license 88) (closes issue #11955) Reported by: tsearle (closes issue #10530) Reported by: xmarksthespot git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103801 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18There was an invalid assumption when calculating the duration of a file that ↵mmichelson1-1/+1
the filestream in question was created properly. Unfortunately this led to a segfault in the situation where an unknown format was specified in voicemail.conf and a voicemail was recorded. Now, we first check to be sure that the stream was written correctly or else assume a zero duration. (closes issue #12021) Reported by: jakep Tested by: putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103786 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18When a SIP channel is being auto-destroyed, it's possible for it to still betilghman1-0/+8
in bridge code. When that happens, we crash. Delay the RTP destruction until the bridge is ended. (closes issue #11960) Reported by: norman Patches: 20080215__bug11960__2.diff.txt uploaded by Corydon76 (license 14) Tested by: norman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103780 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-15In the case that you try to directly reload a module has returned russell1-2/+10
AST_MODULE_LOAD_DECLINE, log a message indicating that the module is not fully initialized and must be initialized using "module load". git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103728 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-15Don't attempt to execute the reload callback for a module that returnedrussell1-1/+1
AST_MODULE_LOAD_DECLINE. This fixes a crash that was reported against chan_console in trunk. (closes issue #11953, reported by junky, fixed by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103726 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-06Add missing header file and ASTERISK_FILE_VERSION usage.file1-0/+4
(closes issue #11936) Reported by: snuffy git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102653 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-02-01Compatibility fix for OpenWRT (reported by Brian Capouch via the mailing list)tilghman1-1/+9
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101772 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-31Fix a couple of places where ast_frfree() was not called on a frame that camerussell2-0/+3
from a translator. This showed itself by g729 decoders not getting released. Since the flag inside the translator frame never got unset by freeing the frame to indicate it was no longer in use, the translators never got destroyed, and thus the g729 licenses were not released. (closes issue #11892) Reported by: xrg Patches: 11892.diff uploaded by russell (license 2) Tested by: xrg, russell git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101601 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-31closes issue #11845; that's the one where there's a 1004 byte cdr leak with ↵murf1-1/+2
every AMI Redirect to a zap channel git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101480 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-30Fix an issue where if a frame of higher sample size preceeded a frame of ↵file1-2/+2
lower sample size and ast_slinfactory_read was called with a sample size of the combined values or higher a crash would happen. (closes issue #11878) Reported by: stuarth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101222 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-29Fix the last couple of issues related to building from a path that contains ↵russell1-2/+2
spaces. (closes issue #11834) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100932 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-28WaitExten didn't handle AbsoluteTimeout properly (went to 't' instead of 'T')tilghman1-1/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100675 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-28Make some deadlock related fixes. These bugs were discovered and reportedrussell1-2/+13
internally at Digium by Steve Pitts. - Fix up chan_local to ensure that the channel lock is held before the local pvt lock. - Don't hold the channel lock when executing the timing function, as it can cause a deadlock when using chan_local. This actually changes the code back to be how it was before the change for issue #10765. But, I added some other locking that I think will prevent the problem reported there, as well. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100581 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-27When deleting a task from the scheduler, ignoring the return value couldtilghman4-32/+13
possibly cause memory to be accessed after it is freed, which causes all sorts of random memory corruption. Instead, if a deletion fails, wait a bit and try again (noting that another thread could change our taskid value). (closes issue #11386) Reported by: flujan Patches: 20080124__bug11386.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, flujan, stuarth` git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100465 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-24Fix compilation on Solaris.qwell1-3/+6
(closes issue #11832) Patches: bug-11832.diff uploaded by snuffy (license 35) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100138 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-23Just confirmed that all current platforms need this header filetilghman1-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99718 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22Fix the defines for OS X (and Solaris, too)tilghman1-13/+13
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99643 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22Ensure that we can get an address even when we don't have a default route.tilghman1-2/+157
(closes issue #9225) Reported by: junky Patches: 20080122__bug9225.diff.txt uploaded by Corydon76 (license 14) Tested by: oej, loloski, sergee git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99540 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-19Fix a couple of memory leaks with frame handling. Specifically,russell1-1/+10
ast_frame_free() needed to be called on the frame that came from the translator to signed linear. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99187 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Revert adding the packed attribute, as it really doesn't make sense why thatrussell1-3/+3
would do any good. Fix the real bug, which is to do the check to see if the frame came from a translator at the beginning of ast_frame_free(), instead of at the end. This ensures that it always gets checked, even if none of the parts of the frame are malloc'd, and also ensures that we aren't looking at free'd memory in the case that it is a malloc'd frame. (closes issue #11792, reported by explidous, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99081 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17missed that one while revertingpari1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99010 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17reverting 99001 - We need the Max-Age for extending the life of cookie ↵pari1-6/+2
mansession_id git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99007 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17Have IAX2 optimize the codec translation path just like chan_sip does it. Ifrussell1-1/+37
the caller's codec is in our codec list, move it to the top to avoid transcoding. (closes issue #10500) Reported by: stevedavies Patches: iax-prefer-current-codec.patch uploaded by stevedavies (license 184) iax-prefer-current-codec.1.4.patch uploaded by stevedavies (license 184) Tested by: stevedavies, pj, sheldonh git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99004 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17we should only send the Set-Cookie header to the browser on the first ↵kpfleming1-2/+6
response after creating a manager session, not on every response (doing so causes the browser to clear any local cookies it may have associated with the session) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99001 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-16Replace current spy architecture with backport of audiohooks. This should ↵file4-575/+687
take care of current known spy issues. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98972 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-16Introduce a lock into the dialing API that protects it when destroying the ↵file1-0/+15
structure. (closes issue #11687) Reported by: callguy Patches: 11687.diff uploaded by file (license 11) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98960 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-16Add two more SDP names for ulaw and alaw.file1-0/+2
(closes issue #11777) Reported by: tootai git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98958 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15Commit a fix for some memory access errors pointed out by the valgrind2.txtrussell4-11/+45
output on issue #11698. The issue here is that it is possible for an instance of a translator to get destroyed while the frame allocated as a part of the translator is still being processed. Specifically, this is possible anywhere between a call to ast_read() and ast_frame_free(), which is _a lot_ of places in the code. The reason this happens is that the channel might get masqueraded during this time. During a masquerade, existing translation paths get destroyed. So, this patch fixes the issue in an API and ABI compatible way. (This one is for you, paravoid!) It changes an int in ast_frame to be used as flag bits. The 1 bit is still used to indicate that the frame contains timing information. Also, a second flag has been added to indicate that the frame came from a translator. When a frame with this flag gets released and has this flag, a function is called in translate.c to let it know that this frame is doing being processed. At this point, the flag gets cleared. Also, if the translator was requested to be destroyed while its internal frame still had this flag set, its destruction has been deffered until it finds out that the frame is no longer being processed. Admittedly, this feels like a hack. But, it does fix the issue, and I was not able to think of a better solution ... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98943 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-14Revert a change that introduces an unacceptable performance hit and is causingrussell1-4/+2
memory leaks ... (from rev 97973) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98774 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Comment explaining how to force browser to always read some html files from ↵pari1-0/+5
server. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98372 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11If the incoming RTP stream changes codec force the bridge to break if the ↵file1-0/+10
other side does not support it. (closes issue #11729) Reported by: tsearle Patches: new_codec_patch_udiff.patch uploaded by tsearle (license 373) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98325 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Properly report the hangup cause as no answer when someone does not answermmichelson1-0/+4
(closes issue #10574, reported by boch, patched by moy) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98315 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Backport the ability to set the ToS bits on Linux when not running as root.russell2-5/+29
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-11Fix samples vs. length calculations for g722russell1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98082 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Simplify this code with a suggestion from Luigi on the asterisk-dev list.russell1-19/+6
Instead of using is16kHz(), implement a format_rate() function. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98025 f38db490-d61c-443f-a65b-d21fe96a405b