Commit Graph

355 Commits

Author SHA1 Message Date
Mark Spencer 4d73c80fa1 Minor cleanup on dtmf calling (bug #7076)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:45:18 +00:00
BJ Weschke 085a4eaa04 Make the "Avoided Initial Deadlock for '....', X retries!" a LOG_DEBUG msg instead of LOG_WARNING as this only has relevance to developers trying to resolve a possible problem. #6949
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 22:18:07 +00:00
Luigi Rizzo 5522238a7e remove useless variables, and argument checks for functions
that can safely handle a NULL argument.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 17:44:30 +00:00
Luigi Rizzo d1caf26728 no point in clearing a local variable just before return
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 17:30:37 +00:00
Kevin P. Fleming 8e9058679a remove T38_SUPPORT define that is no longer needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 08:47:47 +00:00
Matt O'Gorman 6fd00ee7ec more janitor work, patch from bug 6975.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 21:44:25 +00:00
Kevin P. Fleming 574e14cbea Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:11:45 +00:00
Luigi Rizzo e48275fea3 convert to use ast_stream_and_wait
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 20:39:50 +00:00
Luigi Rizzo 0dbf814a79 - use symbolic constants and macros to play with the debug flag
on the frame counters. Document it in the header file.
- provide a single exit point for a function;
- mark XXX some unclear parts of the code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 14:49:21 +00:00
Luigi Rizzo 309f16bd07 make NULL and "" equivalent in cid fields, mark some missing NULL checks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 10:05:45 +00:00
Luigi Rizzo 585e50fb38 move to a different file (channel.c for the time being) the
wrappers around the basic 'say' functions, and redeclare these
wrappers as ordinary functions rather than function pointers.

This way, alternative implementations of the 'say' functions
will only have to implement the basic functions and not the
wrappers.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 07:23:22 +00:00
Luigi Rizzo 52430bda0d - use ast_calloc instead of ast_malloc
- use ast_channel_lock/unlock in a few places
- comment some dubious pieces of code
- use memset to zero a buffer



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 06:58:20 +00:00
Joshua Colp 021876711f Do not depend on having an end sound for stopping the bridge when time runs out. (issue #6979 reported by ppyy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 14:43:32 +00:00
Kevin P. Fleming fc071a182b actually return the number steps... not the number of steps minus 1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 16:43:55 +00:00
Kevin P. Fleming 987f24840c add an API so that the number of steps required for a translation path can be acquired
don't transcode via SLINEAR when the option is enabled but there is a direct path from the source to the destination


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 16:42:03 +00:00
Luigi Rizzo bdfa578990 minor formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 18:10:10 +00:00
Luigi Rizzo 3d7e2145b8 move some duplicated code outside an if/then/else block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 17:59:37 +00:00
Luigi Rizzo 3469287168 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: https://origsvn.digium.com/svn/asterisk/trunk@20569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 17:41:05 +00:00
Luigi Rizzo 8f80cbea14 simplify the ast_channel walking routines.
(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-16 16:58:56 +00:00
Luigi Rizzo ebc152c0da move common conditions to the outside block.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 16:04:24 +00:00
Luigi Rizzo 7783a7a7e6 simplify logic in ast_generic_bridge()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:51:53 +00:00
Luigi Rizzo 9807aab483 move common code in one place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:27:58 +00:00
Luigi Rizzo ba7c8dbd73 avoid returning in the middle of a switch() in ast_answer()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:22:13 +00:00
Luigi Rizzo ad5cfd80c0 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: https://origsvn.digium.com/svn/asterisk/trunk@20511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 15:13:39 +00:00
Luigi Rizzo 5a6cc1ea4e properly reindent a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 14:14:16 +00:00
Luigi Rizzo 577b740f17 add a missing ast_channel_unlock() evidenced by previous commits.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 14:03:43 +00:00
Luigi Rizzo 5afbcc4f86 remove an extra lock.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 14:00:17 +00:00
Luigi Rizzo 845298a7b3 - 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: https://origsvn.digium.com/svn/asterisk/trunk@20454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 13:58:43 +00:00
Luigi Rizzo ed6def5c46 Localize some variables documenting their usage.
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 13:27:58 +00:00
Olle Johansson 4a312a044d - Fixes to ast_channel_lock functions
- 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-16 12:57:15 +00:00
Luigi Rizzo 4c9c289a5d localize some variables, add some comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 08:01:10 +00:00
Luigi Rizzo 429025db22 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: https://origsvn.digium.com/svn/asterisk/trunk@20389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 07:53:25 +00:00
Olle Johansson e75fa47099 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: https://origsvn.digium.com/svn/asterisk/trunk@20295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 15:07:39 +00:00
Olle Johansson 6b3367bf5c 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: https://origsvn.digium.com/svn/asterisk/trunk@20264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15 08:07:50 +00:00
Luigi Rizzo 160031b7be code cleanup (for loop normalization, remove useless casts and parentheses)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 20:47:06 +00:00
Kevin P. Fleming 7bf8d36c8b 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: https://origsvn.digium.com/svn/asterisk/trunk@19349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:50:48 +00:00
Joshua Colp 0f1321d423 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: https://origsvn.digium.com/svn/asterisk/trunk@19062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 03:50:17 +00:00
Joshua Colp e4811a8248 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: https://origsvn.digium.com/svn/asterisk/trunk@18979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 23:29:50 +00:00
Luigi Rizzo 5d34c2bbe1 minor formatting cleanup and removal of trailing whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 15:40:12 +00:00
Luigi Rizzo e57131511e the fix for bug #6399 makes sense. thanks wrmem for the report.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 08:02:35 +00:00
Matt O'Gorman 3112b3b49f list word cant be used with g++ and causes problems
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-04-03 19:42:26 +00:00
Russell Bryant 03ce34e1aa convert internal timing to be stored as a flag in the ast_options flags
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 06:26:16 +00:00
Olle Johansson 50f0b12880 Issue #5374 - Enable internal timing of generators (cmantunes)
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-30 06:07:04 +00:00
Russell Bryant a3fe92b352 fix memory leak due to not freeing the channel's string fields in
ast_channel_destroy() (issue #6746)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 21:01:04 +00:00
Olle Johansson 9675cd2d42 Make astmm compile (imported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:11:11 +00:00
Olle Johansson cfbce6db40 Revert, needs to be fixed in 1.2 first
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:03:08 +00:00
Olle Johansson 1bda384bb8 Fix compilation with astmm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:02:12 +00:00
Russell Bryant 1323c7be91 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: https://origsvn.digium.com/svn/asterisk/trunk@11251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 02:51:03 +00:00
Kevin P. Fleming 50765d9aa5 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: https://origsvn.digium.com/svn/asterisk/trunk@11060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 04:32:21 +00:00
Kevin P. Fleming a1e703fb01 more memory allocation wrapper conversion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:48:54 +00:00