Misc bridge code improvements
authorRichard Mudgett <rmudgett@digium.com>
Fri, 25 Jan 2013 20:00:21 +0000 (20:00 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 25 Jan 2013 20:00:21 +0000 (20:00 +0000)
commit97dcd1d9350d66f1d5d9a081c0ab9a074e9ce1c8
treec955b42b1394a1bde0d644bae9eec1ae411cb6be
parent7bb540dc8099b000ffef973dca8a0dd701fc47d6
Misc bridge code improvements

* Made multiplexed_bridge_destroy() check if anything to destroy and
cleared bridge_pvt pointer after destruction.

* Made multiplexed_add_or_remove() handling of the chans array simpler.

* Extracted bridge_channel_poke().

* Simplified bridge_array_remove() handling of the bridge->array[].  The
array does not have a NULL sentinel pointer.

* Made ast_bridge_new() not create a temporary bridge just to see if it
can be done.  Only need to check if there is an appropriate bridge tech
available.

* Made ast_bridge_new() clean up on allocation failures.

* Made destroy_bridge() free resources in the opposite order of creation.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
bridges/bridge_multiplexed.c
main/bridging.c