summaryrefslogtreecommitdiff
path: root/channel.c
AgeCommit message (Collapse)Author
2006-04-16minor formatting fixesLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16move some duplicated code outside an if/then/else blockLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16make sure there is [almost] only a single exit point for a very longLuigi Rizzo
function so the flow is easier to follow. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16simplify the ast_channel walking routines.Luigi Rizzo
(the previous version was mine, but this way it is definitely more readable). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16move common conditions to the outside block.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16simplify logic in ast_generic_bridge()Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16move common code in one placeLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16avoid returning in the middle of a switch() in ast_answer()Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16simplify function __ast_request_and_dial() as follows:Luigi Rizzo
- handle immediately failures in ast_request(); This removes the need for checking 'chan' multiple times afterwards. - handle immediately failures in ast_call(), by moving the one-line case at the top of the 'if' statement; - use ast_strlen_zero in several places instead of expanding it inline; - make outstate always a valid pointer; On passing mark an unclear statement and replace a magic number with sizeof(tmp). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16properly reindent a blockLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16add a missing ast_channel_unlock() evidenced by previous commits.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16remove an extra lock.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16- replace some nested 'if' with '&&'Luigi Rizzo
- bring the short case at the top of an 'if' statement (also fix misformatting) - replace several 'if' with the '?' operator; - invert the condition on an 'if' to reduce the nesting depth (reindentation to be done later). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16Localize some variables documenting their usage.Luigi Rizzo
Comment a possible problem with locking. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16- Fixes to ast_channel_lock functionsOlle Johansson
- New get_sip_pvt_byid function (not really used correctly yet...) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16localize some variables, add some comments.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16implement ast_waitfordigit() and ast_readstring() in termsLuigi Rizzo
of their '_full()' version, so we can remove the replicated implementation and, especially, the risk that they get out of sync. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15More ast_channel_lock fixesOlle Johansson
- Update lock.h with definitions of ast_channel_lock, ast_channel_unlock and ast_channel_trylock - Convert some functions (but not all) in channel.c - Fix some bugs in chan_sip.c - Convert rest of chan_sip.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15New functions for locking a channel - these simplify debuggingOlle Johansson
when you have channel locking issues. (Part of the SIP transfer patch, where I had a *lot* of channel locking problems) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14code cleanup (for loop normalization, remove useless casts and parentheses)Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11Merged revisions 19347 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r19347 | kpfleming | 2006-04-11 16:35:52 -0500 (Tue, 11 Apr 2006) | 2 lines simplify spy queue flushing logic, and always force a flush when one side gets full, even if the other side is not empty (issue #6457) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11Data stores do not need a lock. As well change the way they are removed from ↵Joshua Colp
the channel when it is destroyed (thanks Russell Wussell) and finally... because C++ is silly... change our list macro info thing to be "entry" instead of "list". git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10Presenting a revised data stores and oh my, a generic speech recognition ↵Joshua Colp
API! I wonder what we can do with this now... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06minor formatting cleanup and removal of trailing whitespace.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06the fix for bug #6399 makes sense. thanks wrmem for the report.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03list word cant be used with g++ and causes problemsMatt O'Gorman
with h323. patch from bug 6446, renames list to chan_list git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30convert internal timing to be stored as a flag in the ast_options flagsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30Issue #5374 - Enable internal timing of generators (cmantunes)Olle Johansson
Thanks everyone involved for hard work, testing and testing! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19fix memory leak due to not freeing the channel's string fields inRussell Bryant
ast_channel_destroy() (issue #6746) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06Make astmm compile (imported from 1.2)Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06Revert, needs to be fixed in 1.2 firstOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06Fix compilation with astmmOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27Merged revisions 11250 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11250 | russell | 2006-02-26 21:50:09 -0500 (Sun, 26 Feb 2006) | 2 lines don't hang up the channel if its state is set to UP before we return from ast_call (issue #6569) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25Merged revisions 11058 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11058 | kpfleming | 2006-02-24 22:23:48 -0600 (Fri, 24 Feb 2006) | 2 lines ensure that spy frame queueing is able to deal with translation failing for any reason (issue #6546) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15more memory allocation wrapper conversionKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14add 'systemname' option to prefix channel unique IDs with (issue #5825)Kevin P. Fleming
convert chan->uniqueid to a stringfield from a fixed-size buffer git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11Merged revisions 9581 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r9581 | russell | 2006-02-11 13:15:00 -0500 (Sat, 11 Feb 2006) | 2 lines now that CDR is a loadable module, don't depend on it elsewhere (issue #6460) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11Add capability to retrieve list of channel typesMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-03Bug 6322 - Implementation of SHA1 in Asterisk (plus dialplan function to use it)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01use string fields for some stuff in ast_channelKevin P. Fleming
const-ify some more APIs remove 'type' field from ast_channel, in favor of the one in the channel's tech structure allow string field module users to specify the 'chunk size' for pool allocations update chan_alsa to be compatible with recent const-ification patches git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-31define a global null_frame object so when queueing a null frame, you don'tRussell Bryant
have to allocate one on the stack git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30Merge Rizzo's waitfor update (bug #4584)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-29don't use tone generation for DTMF if the channel driver only supports ↵Kevin P. Fleming
begin/end (will need more work to translate non-variable events into begin/end events) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-29add channel-driver callbacks for variable length DTMFKevin P. Fleming
teach ast_write() to call those new callbacks git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-29make ast_read() able to handle channel read()/exception() methods that ↵Kevin P. Fleming
return a chain of frames cleanup code in ast_read() add AST_FRAME_DTMF_BEGIN and AST_FRAME_DTMF_END so that variable-length DTMF events can be supported teach chan_zap to send DTMF_BEGIN and DTMF_END when appropriate git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25Issue #6349 - patch by markster, imported from 1.2Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24Merged revisions 8588 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r8588 | kpfleming | 2006-01-24 16:32:09 -0600 (Tue, 24 Jan 2006) | 2 lines ensure that channel cannot become zombie after we check but before we try to start indications ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24convert ast_channel list to use linked list macros (issue #6338)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24- Report SIP reload in manager (issue 5742 with small changes)Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22Merged revisions 8437 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r8437 | russell | 2006-01-22 12:47:13 -0500 (Sun, 22 Jan 2006) | 2 lines fix MixMonitor crash (issue #6321, probably others) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8438 65c4cc65-6c06-0410-ace0-fbb531ad65f3