aboutsummaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
2009-04-20Merged revisions 189539 via svnmerge from tilghman1-2/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r189539 | tilghman | 2009-04-20 17:10:25 -0500 (Mon, 20 Apr 2009) | 3 lines Use nanosleep instead of poll. This is not just because mmichelson suggested it, but also because Mac OS X puked on my poll(). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@189540 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-20Merged revisions 189278 via svnmerge from mmichelson1-7/+7
https://origsvn.digium.com/svn/asterisk/trunk ................ r189278 | mmichelson | 2009-04-20 09:05:27 -0500 (Mon, 20 Apr 2009) | 18 lines Merged revisions 189277 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r189277 | mmichelson | 2009-04-20 09:04:41 -0500 (Mon, 20 Apr 2009) | 12 lines Move the check for chan->fdno == -1 to after the zombie/hangup check. Many users were finding that their hung up channels were staying up and causing 100% CPU usage. (issue #14723) Reported by: seadweller Patches: 14723_1-4-tip.patch uploaded by mmichelson (license 60) Tested by: falves11, bamby ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@189281 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17Merged revisions 189077 via svnmerge from seanbright1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r189077 | seanbright | 2009-04-17 15:36:38 -0400 (Fri, 17 Apr 2009) | 1 line Fix copy/paste error with 'transmit silence' flag. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@189081 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17Merged revisions 189010 via svnmerge from mnicholson1-1/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r189010 | mnicholson | 2009-04-17 10:44:18 -0500 (Fri, 17 Apr 2009) | 12 lines Merged revisions 189009 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r189009 | mnicholson | 2009-04-17 10:43:09 -0500 (Fri, 17 Apr 2009) | 5 lines Make Busy() application set the CDR disposition to BUSY. (closes issue #14306) Reported by: cristiandimache ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@189068 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-15Merged revisions 188585 via svnmerge from mmichelson1-2/+7
https://origsvn.digium.com/svn/asterisk/trunk ................ r188585 | mmichelson | 2009-04-15 15:17:33 -0500 (Wed, 15 Apr 2009) | 13 lines Merged revisions 188582 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r188582 | mmichelson | 2009-04-15 15:04:20 -0500 (Wed, 15 Apr 2009) | 7 lines Update ast_readvideo_callback to match ast_readaudio_callback. This fixes potential refcount errors that may occur on ast_filestreams. AST-208 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@188598 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-14Merged revisions 188413 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r188413 | file | 2009-04-14 14:40:50 -0300 (Tue, 14 Apr 2009) | 5 lines Fix an incorrect clock rate when sending T140 text. (closes issue #14029) Reported by: epicac ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@188416 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-14Merged revisions 188210 via svnmerge from tilghman1-0/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r188210 | tilghman | 2009-04-14 00:45:13 -0500 (Tue, 14 Apr 2009) | 2 lines As suggested by Russell, warn users when their dialplan arguments contain pipes, but not commas. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@188213 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10Merged revisions 187599 via svnmerge from tilghman8-12/+12
https://origsvn.digium.com/svn/asterisk/trunk ........ r187599 | tilghman | 2009-04-09 22:55:27 -0500 (Thu, 09 Apr 2009) | 2 lines Modify headers and macros, according to Russell's suggestions on the -dev list ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@187601 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09Merged revisions 186379 via svnmerge from dvossel1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r186379 | dvossel | 2009-04-03 11:29:47 -0500 (Fri, 03 Apr 2009) | 6 lines audio_audiohook_write_list() did not correctly update sample size after ast_translate. audio_audiohook_write_list() did not take into account that the sample size may change after translation depending on if the original frame is is 8khz or 16khz. the sample size is now updated after translating to reflect this possibility. This caused the audio on the receiving end to sound terrible. Thanks to jcolp and mmichelson for helping me work this out. (issue AST-197) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@187546 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09Merged revisions 187483 via svnmerge from tilghman1-6/+17
https://origsvn.digium.com/svn/asterisk/trunk ................ r187483 | tilghman | 2009-04-09 13:40:01 -0500 (Thu, 09 Apr 2009) | 15 lines Merged revisions 187428 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r187428 | tilghman | 2009-04-09 13:08:20 -0500 (Thu, 09 Apr 2009) | 8 lines Race condition between ast_cli_command() and 'module unload' could cause a deadlock. Add lock timeouts to avoid this potential deadlock. (closes issue #14705) Reported by: jamessan Patches: 20090320__bug14705.diff.txt uploaded by tilghman (license 14) Tested by: jamessan ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@187487 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09Merged revisions 187302 via svnmerge from tilghman4-4/+283
https://origsvn.digium.com/svn/asterisk/trunk ................ r187302 | tilghman | 2009-04-08 23:59:05 -0500 (Wed, 08 Apr 2009) | 14 lines Merged revisions 187300-187301 via svnmerge from 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@187303 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08Merged revisions 186985 via svnmerge from mmichelson1-6/+10
https://origsvn.digium.com/svn/asterisk/trunk ................ r186985 | mmichelson | 2009-04-08 10:27:41 -0500 (Wed, 08 Apr 2009) | 30 lines Merged revisions 186984 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r186984 | mmichelson | 2009-04-08 10:26:46 -0500 (Wed, 08 Apr 2009) | 24 lines Make a couple of changes with regards to a new message printed in ast_read(). "ast_read() called with no recorded file descriptor" is a new message added after a bug was discovered. Unfortunately, it seems there are a bunch of places that potentially make such calls to ast_read() and trigger this error message to be displayed. This commit does two things to help to make this message appear less. First, the message has been downgraded to a debug level message if dev mode is not enabled. The message means a lot more to developers than it does to end users, and so developers should take an effort to be sure to call ast_read only when a channel is ready to be read from. However, since this doesn't actually cause an error in operation and is not something a user can easily fix, we should not spam their console with these messages. Second, the message has been moved to after the check for any pending masquerades. ast_read() being called with no recorded file descriptor should not interfere with a masquerade taking place. This could be seen as a simple way of resolving issue #14723. However, I still want to try to clear out the existing ways of triggering this message, since I feel that would be a better resolution for the issue. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@186988 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-07Merged revisions 186833 via svnmerge from mmichelson1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r186833 | mmichelson | 2009-04-07 18:50:56 -0500 (Tue, 07 Apr 2009) | 15 lines Merged revisions 186832 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r186832 | mmichelson | 2009-04-07 18:49:49 -0500 (Tue, 07 Apr 2009) | 8 lines Set the AST_FEATURE_WARNING_ACTIVE flag when a p2p bridge returns AST_BRIDGE_RETRY. Without this flag set, warning sounds will not be properly played to either party of the bridge. (closes issue #14845) Reported by: adomjan ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@186836 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-07Merged revisions 186720 via svnmerge from mmichelson1-3/+4
https://origsvn.digium.com/svn/asterisk/trunk ................ r186720 | mmichelson | 2009-04-07 15:46:18 -0500 (Tue, 07 Apr 2009) | 12 lines Merged revisions 186719 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r186719 | mmichelson | 2009-04-07 15:43:49 -0500 (Tue, 07 Apr 2009) | 6 lines Ensure that \r\n is printed after the ActionID in an OriginateResponse. (closes issue #14847) Reported by: kobaz ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@186723 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03Merged revisions 186297 via svnmerge from tilghman1-1/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r186297 | tilghman | 2009-04-03 10:18:28 -0500 (Fri, 03 Apr 2009) | 4 lines Compatibility fix for glibc 2.4 (Closes issue #14820) Reported by: phsultan ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@186302 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-02Merged revisions 186021 via svnmerge from tilghman1-1/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r186021 | tilghman | 2009-04-02 10:14:22 -0500 (Thu, 02 Apr 2009) | 7 lines Missed a common case for needing to extend the buffer. (closes issue #14716) Reported by: sum Patches: 20090402__bug14716.diff.txt uploaded by tilghman (license 14) Tested by: sum ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@186022 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01Merged revisions 185912 via svnmerge from tilghman5-20/+14
https://origsvn.digium.com/svn/asterisk/trunk ........ r185912 | tilghman | 2009-04-01 15:13:28 -0500 (Wed, 01 Apr 2009) | 4 lines Merge changes from str_substitution that are unrelated to that branch. Included is a small bugfix to an ast_str helper, but most of these changes are simply doxygen fixes. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@185947 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01Merged revisions 185772 via svnmerge from russell1-0/+7
https://origsvn.digium.com/svn/asterisk/trunk ................ r185772 | russell | 2009-04-01 08:48:26 -0500 (Wed, 01 Apr 2009) | 14 lines Merged revisions 185771 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185771 | russell | 2009-04-01 08:47:30 -0500 (Wed, 01 Apr 2009) | 6 lines Fix a case where DTMF could bypass audiohooks. This change fixes a situation where an audiohook that wants DTMF would not actually get it. This is in the code path where we end DTMF digit length emulation while handling a NULL frame. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@185775 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Merged revisions 185197 via svnmerge from file1-3/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r185197 | file | 2009-03-31 11:07:36 -0300 (Tue, 31 Mar 2009) | 15 lines Merged revisions 185196 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185196 | file | 2009-03-31 11:06:39 -0300 (Tue, 31 Mar 2009) | 8 lines Fix crash when moving audiohooks between channels. Handle the scenario where we are called to move audiohooks between channels and the source channel does not actually have any on it. (closes issue #14734) Reported by: corruptor ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@185200 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184762 via svnmerge from kpfleming2-96/+64
https://origsvn.digium.com/svn/asterisk/trunk ........ r184762 | kpfleming | 2009-03-27 14:10:32 -0500 (Fri, 27 Mar 2009) | 12 lines Improve timing interface to remember which provider provided a timer The ability to load/unload timing interfaces is nice, but it means that when a timer is allocated, it may come from provider A, but later provider B becomes the 'preferred' provider. If this happens, all timer API calls on the timer that was provided by provider A will actually be handed to provider B, which will say WTF and return an error. This patch changes the timer API to include a pointer to the provider of the timer handle so that future operations on the timer will be forwarded to the proper provider. (closes issue #14697) Reported by: moy Review: http://reviewboard.digium.com/r/211/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184779 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184726 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r184726 | russell | 2009-03-27 13:04:43 -0500 (Fri, 27 Mar 2009) | 2 lines Use ast_random() instead of rand() to ensure we use the best RNG available. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184729 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184693 via svnmerge from russell2-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r184693 | russell | 2009-03-27 11:21:10 -0500 (Fri, 27 Mar 2009) | 2 lines Change global_app_buf to ast_str_thread_global_buf. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184707 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184630 via svnmerge from russell3-6/+6
https://origsvn.digium.com/svn/asterisk/trunk ........ r184630 | russell | 2009-03-27 09:00:18 -0500 (Fri, 27 Mar 2009) | 2 lines Change g_eid to ast_eid_default. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184632 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184515 via svnmerge from russell1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r184515 | russell | 2009-03-26 20:40:28 -0500 (Thu, 26 Mar 2009) | 2 lines Don't act surprised if we get a -1 indication. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184518 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184512 via svnmerge from russell1-0/+20
https://origsvn.digium.com/svn/asterisk/trunk ........ r184512 | russell | 2009-03-26 20:35:56 -0500 (Thu, 26 Mar 2009) | 2 lines Pass more useful information through to lock tracking when DEBUG_THREADS is on. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184514 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Merged revisions 184344 via svnmerge from russell1-1/+10
https://origsvn.digium.com/svn/asterisk/trunk ........ r184344 | russell | 2009-03-25 17:11:35 -0500 (Wed, 25 Mar 2009) | 2 lines Remove unneeded AST_LIST_ENTRY() and comment on the purpose of ast_event_ref. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184346 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Merged revisions 184339 via svnmerge from russell3-164/+396
https://origsvn.digium.com/svn/asterisk/trunk ........ r184339 | russell | 2009-03-25 16:57:19 -0500 (Wed, 25 Mar 2009) | 35 lines Improve performance of the ast_event cache functionality. This code comes from svn/asterisk/team/russell/event_performance/. Here is a summary of the changes that have been made, in order of both invasiveness and performance impact, from smallest to largest. 1) Asterisk 1.6.1 introduces some additional logic to be able to handle distributed device state. This functionality comes at a cost. One relatively minor change in this patch is that the extra processing required for distributed device state is now completely bypassed if it's not needed. 2) One of the things that I noticed when profiling this code was that a _lot_ of time was spent doing string comparisons. I changed the way strings are represented in an event to include a hash value at the front. So, before doing a string comparison, we do an integer comparison on the hash. 3) Finally, the code that handles the event cache has been re-written. I tried to do this in a such a way that it had minimal impact on the API. I did have to change one API call, though - ast_event_queue_and_cache(). However, the way it works now is nicer, IMO. Each type of event that can be cached (MWI, device state) has its own hash table and rules for hashing and comparing objects. This by far made the biggest impact on performance. For additional details regarding this code and how it was tested, please see the review request. (closes issue #14738) Reported by: russell Review: http://reviewboard.digium.com/r/205/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184343 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Merged revisions 183652 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r183652 | file | 2009-03-22 18:00:28 -0300 (Sun, 22 Mar 2009) | 4 lines Fix a minor logic flaw with the bridge generic thread. We only want to move the channel pointers that are actually present. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184266 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Merged revisions 184220 via svnmerge from eliel1-3/+10
https://origsvn.digium.com/svn/asterisk/trunk ................ r184220 | eliel | 2009-03-25 10:38:19 -0400 (Wed, 25 Mar 2009) | 19 lines Merged revisions 184188 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r184188 | eliel | 2009-03-25 10:12:54 -0400 (Wed, 25 Mar 2009) | 13 lines Avoid destroying the CLI line when moving the cursor backward and trying to autocomplete. When moving the cursor backward and pressing TAB to autocomplete, a NULL is put in the line and we are loosing what we have already wrote after the actual cursor position. (closes issue #14373) Reported by: eliel Patches: asterisk.c.patch uploaded by eliel (license 64) Tested by: lmadsen ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184256 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Merged revisions 184219 via svnmerge from russell1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r184219 | russell | 2009-03-25 09:33:32 -0500 (Wed, 25 Mar 2009) | 2 lines Include poll-compat.h ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184221 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Merged revisions 184151 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r184151 | russell | 2009-03-24 21:03:13 -0500 (Tue, 24 Mar 2009) | 2 lines Change poll() to ast_poll(). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184152 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-24Merged revisions 184043 via svnmerge from russell1-0/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r184043 | russell | 2009-03-24 17:00:58 -0500 (Tue, 24 Mar 2009) | 2 lines Put siren7 and siren14 in ast_best_codec() just so they're in there somewhere. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184044 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-23Merged revisions 183865 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r183865 | tilghman | 2009-03-23 18:28:20 -0500 (Mon, 23 Mar 2009) | 2 lines Allow browsers to cache images and other static content. (This is a regression over 1.4) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@183868 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183242 via svnmerge from russell1-13/+0
https://origsvn.digium.com/svn/asterisk/trunk ................ r183242 | russell | 2009-03-19 13:00:15 -0500 (Thu, 19 Mar 2009) | 10 lines Merged revisions 183241 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183241 | russell | 2009-03-19 12:52:52 -0500 (Thu, 19 Mar 2009) | 2 lines Remove the use of RTLD_NOLOAD, as it is not behaving like expected. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@183263 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18Merged revisions 183057 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r183057 | file | 2009-03-18 19:22:56 -0300 (Wed, 18 Mar 2009) | 6 lines Fix an issue where a T38 control frame would get dropped. If two channels were bridged together using a generic bridge the T38 control frame would get passed up instead of being indicated on the other channel. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@183068 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18Merged revisions 182847 via svnmerge from russell6-33/+22
https://origsvn.digium.com/svn/asterisk/trunk ................ r182847 | russell | 2009-03-17 21:28:55 -0500 (Tue, 17 Mar 2009) | 52 lines Merged revisions 182810 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines Fix cases where the internal poll() was not being used when it needed to be. We have seen a number of problems caused by poll() not working properly on Mac OSX. If you search around, you'll find a number of references to using select() instead of poll() to work around these issues. In Asterisk, we've had poll.c which implements poll() using select() internally. However, we were still getting reports of problems. vadim investigated a bit and realized that at least on his system, even though we were compiling in poll.o, the system poll() was still being used. So, the primary purpose of this patch is to ensure that we're using the internal poll() when we want it to be used. The changes are: 1) Remove logic for when internal poll should be used from the Makefile. Instead, put it in the configure script. The logic in the configure script is the same as it was in the Makefile. Ideally, we would have a functionality test for the problem, but that's not actually possible, since we would have to be able to run an application on the _target_ system to test poll() behavior. 2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT is not defined. 3) Change uses of poll() throughout the source tree to ast_poll(). I feel that it is good practice to give the API call a new name when we are changing its behavior and not using the system version directly in all cases. So, normally, ast_poll() is just redefined to poll(). On systems where AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll(). 4) Change poll() in main/poll.c to be ast_internal_poll(). It's worth noting that any code that still uses poll() directly will work fine (if they worked fine before). So, for example, out of tree modules that are using poll() will not stop working or anything. However, for modules to work properly on Mac OSX, ast_poll() needs to be used. (closes issue #13404) Reported by: agalbraith Tested by: russell, vadim http://reviewboard.digium.com/r/198/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@182947 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17Merged revisions 182553 via svnmerge from russell1-3/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r182553 | russell | 2009-03-17 10:22:12 -0500 (Tue, 17 Mar 2009) | 5 lines Tweak the handling of the frame list inside of ast_answer(). This does not change any behavior, but moves the frames from the local frame list back to the channel read queue using an O(n) algorithm instead of O(n^2). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@182592 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17Merged revisions 182530 via svnmerge from kpfleming1-1/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r182530 | kpfleming | 2009-03-17 09:59:33 -0500 (Tue, 17 Mar 2009) | 2 lines correct logic flaw in ast_answer() changes in r182525 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@182534 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17Merged revisions 182525 via svnmerge from kpfleming2-35/+101
https://origsvn.digium.com/svn/asterisk/trunk ........ r182525 | kpfleming | 2009-03-17 09:38:11 -0500 (Tue, 17 Mar 2009) | 11 lines Improve behavior of ast_answer() to not lose incoming frames ast_answer(), when supplied a delay before returning to the caller, use ast_safe_sleep() to implement the delay. Unfortunately during this time any incoming frames are discarded, which is problematic for T.38 re-INVITES and other sorts of channel operations. When a delay is not passed to ast_answer(), it still delays for up to 500 milliseconds, waiting for media to arrive. Again, though, it discards any control frames, or non-voice media frames. This patch rectifies this situation, by storing all incoming frames during the delay period on a list, and then requeuing them onto the channel before returning to the caller. http://reviewboard.digium.com/r/196/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@182528 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17Merged revisions 182450 via svnmerge from tilghman1-3/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r182450 | tilghman | 2009-03-17 00:51:54 -0500 (Tue, 17 Mar 2009) | 14 lines Merged revisions 182449 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r182449 | tilghman | 2009-03-17 00:50:52 -0500 (Tue, 17 Mar 2009) | 7 lines Fix race in astdb The underlying db1 implementation does not fully isolate the pages retrieved from astdb, so the lock protecting accesses needs to be extended until the copy from the shared memory structure is done. (closes issue #14682) Reported by: makoto ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@182453 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-16Fix a memory leak in the ast_answer / __ast_answer API call.file1-0/+5
For a channel that is not yet answered this API call will wait until a voice frame is received on the channel before returning. It does this by waiting for frames on the channel and reading them in. The frames read in were not freed when they should have been. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182171 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13Remove ast_ prefix from functions which are not public.mmichelson1-19/+19
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182071 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13Merged revisions 181990 via svnmerge from mmichelson1-6/+16
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181990 | mmichelson | 2009-03-13 12:12:32 -0500 (Fri, 13 Mar 2009) | 35 lines Check the DYNAMIC_FEATURES of both the chan and peer when interpreting DTMF. Dynamic features defined in the applicationmap section of features.conf allow one to specify whether the caller, callee, or both have the ability to use the feature. The documentation in the features.conf.sample file could be interpreted to mean that one only needs to set the DYNAMIC_FEATURES channel variable on the calling channel in order to allow for the callee to be able to use the features which he should have permission to use. However, the DYNAMIC_FEATURES variable would only be read from the channel of the participant that pressed the DTMF sequence to activate the feature. The result of this was that the callee was unable to use dynamic features unless the dialplan writer had taken measures to be sure that the DYNAMIC_FEATURES variable was set on the callee's channel. This commit changes the behavior of ast_feature_interpret to concatenate the values of DYNAMIC_FEATURES from both parties involved in the bridge. The features themselves determine who has permission to use them, so there is no reason to believe that one side of the bridge could gain the ability to perform an action that they should not have the ability to perform. Kevin Fleming pointed out on the asterisk-users list that the typical way that this was worked around in the past was by setting _DYNAMIC_FEATURES on the calling channel so that the value would be inherited by the called channel. While this works, the documentation alone is not enough to figure out why this is necessary for the callee to be able to use dynamic features. In this particular case, changing the code to match the documentation is safe, easy, and will generally make things easier for people for future installations. This bug was originally reported on the asterisk-users list by David Ruggles. (closes issue #14657) Reported by: mmichelson Patches: 14657.patch uploaded by mmichelson (license 60) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182029 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-12Adjust translation table column widths based upon the translation times.tilghman1-8/+17
Previously, only 5 columns were displayed, and if a translation time exceeded 99,999 useconds, it would be displayed as 0, instead of its actual time. (closes issue #14532) Reported by: pj Patches: 20090311__bug14532.diff.txt uploaded by tilghman (license 14) Tested by: pj git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181731 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Make handling of the BRIDGE_PLAY_SOUND variable thread-safe.russell1-10/+28
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181465 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Make handling of the BRIDGEPVTCALLID variable thread-safe.russell1-8/+17
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181428 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Merged revisions 181423 via svnmerge from russell1-14/+31
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181423 | russell | 2009-03-11 16:42:58 -0500 (Wed, 11 Mar 2009) | 9 lines Make code that updates BRIDGEPEER variable thread-safe. It is not safe to read the name field of an ast_channel without the channel locked. This patch fixes some places in channel.c where this was being done, and lead to crashes related to masquerades. (closes issue #14623) Reported by: guillecabeza ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181424 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Fix malloc debug macros to work properly with h323.jpeeler1-1/+1
The main problem here was that cstdlib was undefining free thereby causing the proper debug macros to not be used. ast_h323.cxx has been changed to call ast_free instead to avoid the issue. A few other issues were addressed: - There were a few instances of functions improperly passing ast_free instead of ast_free_ptr. - Some clean up was done to avoid the debug macros intentionally being redefined. (copied below from Kevin's commit, appreciate the help) - disable astmm.h from doing anything when STANDALONE is defined, which is used by the tools in the utils/ directory that use parts of Asterisk header files in hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are compiled with STANDALONE defined. (closes issue #13593) Reported by: pj git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181135 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Add MALLOC_DEBUG to various utility APIs, so that memory leaks can be ↵tilghman4-21/+142
tracked back to their source. (related to issue #14636) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181028 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Spacing changes onlytilghman1-323/+342
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181027 f38db490-d61c-443f-a65b-d21fe96a405b