dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

340 Commits

Author SHA1 Message Date
rizzo 17adf2ca4e minor formatting fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20596 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 18:10:10 +00:00
rizzo 6b5fac3ca5 move some duplicated code outside an if/then/else block
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20570 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 17:59:37 +00:00
rizzo 0d0d96e8a1 make sure there is [almost] only a single exit point for a very long
function so the flow is easier to follow.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20569 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 17:41:05 +00:00
rizzo 572a3f9f96 simplify the ast_channel walking routines.
(the previous version was mine, but this way it is definitely
more readable).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20543 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 16:58:56 +00:00
rizzo ebd45fb768 move common conditions to the outside block.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20540 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 16:04:24 +00:00
rizzo 8afb9a9b5e simplify logic in ast_generic_bridge()
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20514 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 15:51:53 +00:00
rizzo 5b2e7c4782 move common code in one place
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20513 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 15:27:58 +00:00
rizzo b319115212 avoid returning in the middle of a switch() in ast_answer()
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20512 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 15:22:13 +00:00
rizzo 74b806c647 simplify function __ast_request_and_dial() as follows:
- 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: http://svn.digium.com/svn/asterisk/trunk@20511 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 15:13:39 +00:00
rizzo 10632ecc83 properly reindent a block
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20484 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 14:14:16 +00:00
rizzo 752f273b24 add a missing ast_channel_unlock() evidenced by previous commits.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20477 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 14:03:43 +00:00
rizzo 7e887abee9 remove an extra lock.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20456 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 14:00:17 +00:00
rizzo 8326bd9435 - replace some nested 'if' with '&&'
- 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: http://svn.digium.com/svn/asterisk/trunk@20454 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 13:58:43 +00:00
rizzo 1ee63a0193 Localize some variables documenting their usage.
Comment a possible problem with locking.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20453 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 13:27:58 +00:00
oej d2a8739e6d - Fixes to ast_channel_lock functions
- New get_sip_pvt_byid function (not really used correctly yet...)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20424 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 12:57:15 +00:00
rizzo 4e21113090 localize some variables, add some comments.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20396 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 08:01:10 +00:00
rizzo 1ab52a857a implement ast_waitfordigit() and ast_readstring() in terms
of their '_full()' version, so we can remove the replicated
implementation and, especially, the risk that they get out of sync.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20389 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16 07:53:25 +00:00
oej d4561ff1d1 More ast_channel_lock fixes
- 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: http://svn.digium.com/svn/asterisk/trunk@20295 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-15 15:07:39 +00:00
oej f33b337077 New functions for locking a channel - these simplify debugging
when you have channel locking issues.
(Part of the SIP transfer patch, where I had a *lot* of
channel locking problems)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20264 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-15 08:07:50 +00:00
rizzo 44b2de08cf code cleanup (for loop normalization, remove useless casts and parentheses)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20132 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14 20:47:06 +00:00
kpfleming 374a523ba3 Merged revisions 19347 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@19349 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11 21:50:48 +00:00
file 456701fc7c Data stores do not need a lock. As well change the way they are removed from 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: http://svn.digium.com/svn/asterisk/trunk@19062 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11 03:50:17 +00:00
file 483e826311 Presenting a revised data stores and oh my, a generic speech recognition API! I wonder what we can do with this now...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18979 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-10 23:29:50 +00:00
rizzo 5d1a483bbb minor formatting cleanup and removal of trailing whitespace.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17863 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:40:12 +00:00
rizzo 4decf04093 the fix for bug #6399 makes sense. thanks wrmem for the report.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17753 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 08:02:35 +00:00
mogorman c4347071e8 list word cant be used with g++ and causes problems
with h323.  patch from bug 6446, renames list to chan_list


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17130 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-03 19:42:26 +00:00
russell 5ccd449638 convert internal timing to be stored as a flag in the ast_options flags
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16477 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-30 06:26:16 +00:00
oej 60636c2599 Issue #5374 - Enable internal timing of generators (cmantunes)
Thanks everyone involved for hard work, testing and testing!


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16473 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-30 06:07:04 +00:00
russell b35095d70b fix memory leak due to not freeing the channel's string fields in
ast_channel_destroy() (issue #6746)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@13628 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-19 21:01:04 +00:00
oej c8f5ceca42 Make astmm compile (imported from 1.2)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12041 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-06 11:11:11 +00:00
oej 960be95329 Revert, needs to be fixed in 1.2 first
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12031 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-06 11:03:08 +00:00
oej ed8f50e3bb Fix compilation with astmm
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12025 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-06 11:02:12 +00:00
russell 42589609fa Merged revisions 11250 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@11251 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-27 02:51:03 +00:00
kpfleming f1080eefaf Merged revisions 11058 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@11060 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-25 04:32:21 +00:00
kpfleming ea305ad521 more memory allocation wrapper conversion
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10141 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-15 01:48:54 +00:00
kpfleming 69f7e69869 add 'systemname' option to prefix channel unique IDs with (issue #5825)
convert chan->uniqueid to a stringfield from a fixed-size buffer


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10088 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-14 23:42:36 +00:00
russell 0a0b84d8de Merged revisions 9581 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@9582 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-11 18:31:59 +00:00
markster 24dc28a81f Add capability to retrieve list of channel types
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9508 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-11 07:06:47 +00:00
tilghman d36e97804d Bug 6322 - Implementation of SHA1 in Asterisk (plus dialplan function to use it)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9138 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-03 22:37:29 +00:00
kpfleming 21d21f89c0 use string fields for some stuff in ast_channel
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: http://svn.digium.com/svn/asterisk/trunk@9060 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-01 23:05:28 +00:00
russell b55d2bd3ea define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9001 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-31 17:18:58 +00:00
markster df81c56d13 Merge Rizzo's waitfor update (bug #4584)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8877 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-30 03:13:33 +00:00
kpfleming 666c469664 don't use tone generation for DTMF if the channel driver only supports begin/end (will need more work to translate non-variable events into begin/end events)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8852 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-29 05:29:29 +00:00
kpfleming 9c36c7330f add channel-driver callbacks for variable length DTMF
teach ast_write() to call those new callbacks


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8851 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-29 05:15:24 +00:00
kpfleming d6dcf07573 make ast_read() able to handle channel read()/exception() methods that 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: http://svn.digium.com/svn/asterisk/trunk@8850 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-29 05:07:04 +00:00
oej 54aaae07e5 Issue #6349 - patch by markster, imported from 1.2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-25 09:50:28 +00:00
kpfleming fc8902082c Merged revisions 8588 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@8591 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-24 22:38:17 +00:00
russell 90b3bcb192 convert ast_channel list to use linked list macros (issue #6338)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8571 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-24 20:20:05 +00:00
oej 1e6538d0cc - Report SIP reload in manager (issue 5742 with small changes)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8531 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-24 12:48:44 +00:00
russell ed78054d57 Merged revisions 8437 via svnmerge from
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: http://svn.digium.com/svn/asterisk/trunk@8438 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-22 17:53:14 +00:00