Commit Graph

2234 Commits

Author SHA1 Message Date
Tilghman Lesher be40f3a33c 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: https://origsvn.digium.com/svn/asterisk/trunk@185912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 20:13:28 +00:00
Mark Michelson f1707e95e5 Address Russell's comments regarding rev 185704.
Use ast_debug and ast_softhangup_nolock.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 13:59:34 +00:00
Russell Bryant 083e57a5e5 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: https://origsvn.digium.com/svn/asterisk/trunk@185772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 13:48:26 +00:00
Mark Michelson 378c2e9d2a Allow the AMI Hangup command to accept a Cause header.
(closes issue #14695)
Reported by: mneuhauser
Patches:
      cause-for-hangup-manager-action.patch uploaded by mneuhauser (license 425)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 00:39:01 +00:00
Kevin P. Fleming a009068110 Optimizations to the stringfields API
This patch provides a number of optimizations to the stringfields API, focused around saving (not wasting) memory whenever possible. Thanks to Mark Michelson for inspiring this work and coming up with the first two optimizations that are represented here:

Changes:

- Cleanup of some code, fix incorrect doxygen comments

- When a field is emptied or replaced with a new allocation, decrease the amount of 'active' space in the pool it was held in; if that pool reaches zero active space, and is not the current pool, then free it as it is no longer in use

- When allocating a pool, try to allocate a size that will fit in a 'standard' malloc() allocation without wasting space

- When allocating space for a field, store the amount of space in the two bytes immediately preceding the field; this eliminates the need to call strlen() on the field when overwriting it, and more importantly it 'remembers' the amount of space the field has available, even if a shorter string has been stored in it since it was allocated

- Don't automatically double the size of each successive pool allocated; it's wasteful

http://reviewboard.digium.com/r/165/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 21:29:50 +00:00
Joshua Colp d40f86db1b 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: https://origsvn.digium.com/svn/asterisk/trunk@185197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 14:07:36 +00:00
Kevin P. Fleming 9381bff79d 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: https://origsvn.digium.com/svn/asterisk/trunk@184762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 19:10:32 +00:00
Russell Bryant f745326750 Use ast_random() instead of rand() to ensure we use the best RNG available.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 18:04:43 +00:00
Russell Bryant 2a4f9f7181 Change global_app_buf to ast_str_thread_global_buf.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 16:21:10 +00:00
Russell Bryant b564b2105f Change g_eid to ast_eid_default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 14:00:18 +00:00
Russell Bryant b043f8ab1b Don't act surprised if we get a -1 indication.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 01:40:28 +00:00
Russell Bryant 37b5a29dc7 Pass more useful information through to lock tracking when DEBUG_THREADS is on.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 01:35:56 +00:00
Russell Bryant 189a55f9f0 Remove unneeded AST_LIST_ENTRY() and comment on the purpose of ast_event_ref.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 22:11:35 +00:00
Russell Bryant ee77b475f2 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: https://origsvn.digium.com/svn/asterisk/trunk@184339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 21:57:19 +00:00
Eliel C. Sardanons 79ec90b3b2 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: https://origsvn.digium.com/svn/asterisk/trunk@184220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 14:38:19 +00:00
Russell Bryant bae19927d3 Include poll-compat.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 14:33:32 +00:00
Russell Bryant f9f0d8fe96 Change poll() to ast_poll().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 02:03:13 +00:00
Russell Bryant 2ad737608c Put siren7 and siren14 in ast_best_codec() just so they're in there somewhere.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-24 22:00:58 +00:00
Tilghman Lesher 1745773f30 Allow browsers to cache images and other static content.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-23 23:28:20 +00:00
Joshua Colp dc9c58104e 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: https://origsvn.digium.com/svn/asterisk/trunk@183652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-22 21:00:28 +00:00
Mark Michelson 33c3fce71a Remove symbols I just added to main/asterisk.exports and instead rename the functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-20 16:24:20 +00:00
Mark Michelson 47553ba807 Add some missing symbols to main/asterisk.exports
Hey! chan_sip.so loads now!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-20 16:19:53 +00:00
David Vossel 9d3527bddf Merged revisions 183386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183386 | dvossel | 2009-03-19 14:40:07 -0500 (Thu, 19 Mar 2009) | 6 lines
  
  Cleaning up a few things in detect disconnect patch
  
  Initialized ast_call_feature in detect_disconnect to avoid accessing uninitialized memory.  Cleaned up /param tags in features.h.  No longer send dynamic features in ast_feature_detect. 
  
  issue #11583
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 20:30:39 +00:00
Jason Parker 50155d5952 Merged revisions 183291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183291 | qwell | 2009-03-19 13:28:16 -0500 (Thu, 19 Mar 2009) | 1 line
  
  Export some more required symbols.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 18:34:11 +00:00
Russell Bryant 4210f17abb 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: https://origsvn.digium.com/svn/asterisk/trunk@183242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 18:00:15 +00:00
Russell Bryant 76b7966606 Merged revisions 183238 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183238 | russell | 2009-03-19 12:41:39 -0500 (Thu, 19 Mar 2009) | 1 line

Allow the AES API to work.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 17:42:06 +00:00
David Vossel 2764c2821f Merged revisions 183126 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183126 | dvossel | 2009-03-19 11:15:16 -0500 (Thu, 19 Mar 2009) | 17 lines
  
  Allow disconnect feature before a call is bridged
  
  feature.conf has a disconnect option.  By default this option is set to '*', but it could be anything.  If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else.  This is because features are unavailable until bridging takes place.  The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different.  This patch allows features to be detected from outside of the bridge, but not operated on.  In this case, the disconnect feature can be detected before briding and handled outside of features.c.
  
  (closes issue #11583)
  Reported by: sobomax
  Patches:
  	patch-apps__app_dial.c uploaded by sobomax (license 359)
  	11583.latest-patch uploaded by murf (license 17)
  	detect_disconnect.diff uploaded by dvossel (license 671)
  Tested by: sobomax, dvossel
  Review: http://reviewboard.digium.com/r/195/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 16:28:33 +00:00
Russell Bryant 10529ea029 Merged revisions 183145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183145 | russell | 2009-03-19 11:21:56 -0500 (Thu, 19 Mar 2009) | 1 line

Add missing semicolon in exports script.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 16:22:27 +00:00
Russell Bryant 5cd40194a3 Merged revisions 183123 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183123 | russell | 2009-03-19 11:13:18 -0500 (Thu, 19 Mar 2009) | 2 lines

Allow the CallerID API to work again.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 16:14:06 +00:00
Joshua Colp 10b7b842dc 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: https://origsvn.digium.com/svn/asterisk/trunk@183057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 22:22:56 +00:00
Tilghman Lesher d36ca75e47 Fixing a lost symbol in manager.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 19:41:57 +00:00
Kevin P. Fleming 4f390ec024 Merged revisions 182882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182882 | kpfleming | 2009-03-18 06:31:41 -0500 (Wed, 18 Mar 2009) | 3 lines
  
  fix another symbol namespace issue (reported by Andrew on asterisk-dev)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 11:40:11 +00:00
Russell Bryant 0bdd99ad64 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: https://origsvn.digium.com/svn/asterisk/trunk@182847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:28:55 +00:00
Kevin P. Fleming ab3e9ddad1 Merged revisions 182808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182808 | kpfleming | 2009-03-17 20:55:22 -0500 (Tue, 17 Mar 2009) | 5 lines
  
  Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.
  
  With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:21:23 +00:00
Russell Bryant 9d6ba51d05 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: https://origsvn.digium.com/svn/asterisk/trunk@182553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 15:22:12 +00:00
Kevin P. Fleming 16b9280ba9 correct logic flaw in ast_answer() changes in r182525
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 14:59:33 +00:00
Kevin P. Fleming d11b6386a5 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: https://origsvn.digium.com/svn/asterisk/trunk@182525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 14:38:11 +00:00
Tilghman Lesher 3e22e8bc94 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: https://origsvn.digium.com/svn/asterisk/trunk@182450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 05:51:54 +00:00
Joshua Colp 5308112806 Fix a memory leak in the ast_answer / __ast_answer API call.
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: https://origsvn.digium.com/svn/asterisk/trunk@182171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16 13:58:24 +00:00
Mark Michelson 0892cdb958 Remove ast_ prefix from functions which are not public.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-13 17:49:01 +00:00
Mark Michelson 88e3279f83 Merged revisions 181990 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@182029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-13 17:26:43 +00:00
Tilghman Lesher 86d6cd8a94 Adjust translation table column widths based upon the translation times.
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: https://origsvn.digium.com/svn/asterisk/trunk@181731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12 17:32:13 +00:00
Russell Bryant c61a3f2878 Make handling of the BRIDGE_PLAY_SOUND variable thread-safe.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 22:25:57 +00:00
Russell Bryant ffc7510e7a Make handling of the BRIDGEPVTCALLID variable thread-safe.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 22:14:55 +00:00
Russell Bryant 29cfabf335 Merged revisions 181423 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@181424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 21:49:29 +00:00
Jeff Peeler 58cf8b69da Fix malloc debug macros to work properly with h323.
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: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 04:06:44 +00:00
Tilghman Lesher bfc0d3b795 Add MALLOC_DEBUG to various utility APIs, so that memory leaks can be tracked back to their source.
(related to issue #14636)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 00:29:59 +00:00
Tilghman Lesher ac7e490b94 Spacing changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 00:28:28 +00:00
Joshua Colp 951cbf11d4 Reset the thread local string buffer when handling the UserEvent action.
(closes issue #14593)
Reported by: JimDickenson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-10 14:40:38 +00:00
Jeff Peeler bf0bb7b385 Add Doxygen documentation for API changes from 1.6.0 to 1.6.1
Copied from my review board description:
This is a continuation of the API changes documentation started for describing
changes between releases. Most of the API changes were pretty simple needing
only to be brought to attention via the new "Asterisk API Changes" list.
However, if you see anything that needs further explanation feel free to
supplement what is there. The current method of documenting is to add (in the
header file): \version <ver number> <description of changes> and then to add
the function to the change list in doxyref.h on the AstAPIChanges page. I also
made sure all the functions that were newly added were tagged with \since
1.6.1. I think this is a good habit to start both for the historical aspect as
well as for the future ability to easily add a "New Asterisk API" page.

Review: http://reviewboard.digium.com/r/190/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-09 20:58:17 +00:00