features: Don't cache a struct ast_app pointer.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 11 Feb 2013 18:00:05 +0000 (18:00 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 11 Feb 2013 18:00:05 +0000 (18:00 +0000)
commit3d91f97cf996e002ce512d4abbb1661061ddb495
treed41d146f82fd4fb1e7bc08a7d796a0b2eec5687e
parent4682d32d34dc1fa4af4ab0c2562f6eca62e273f3
features: Don't cache a struct ast_app pointer.

Caching a struct ast_app pointer is not a good idea because someone could
unload the application.  After the applicaiton unload the cached ast_app
pointer is no longer valid.  Only pbx.c can cache the pointer because it
knows when the application is unloaded and removes the pointer.

* Fixed one-touch Monitor and MixMonitor to not cache the ast_app pointer
and not use the silly monitor_ok/mixmonitor_ok/stopmixmonitor_ok flags.

* Extracted bridge_check_monitor() from ast_bridge_call() and use propper
locking.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/features.c