]> git.ipfire.org Git - thirdparty/asterisk.git/commit
CEL: Protect data structures during reload and shutdown.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 24 Jan 2014 23:07:08 +0000 (23:07 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 24 Jan 2014 23:07:08 +0000 (23:07 +0000)
commitc0bbfe63f9493a9717e41f15f529262604e157ee
treeb048368f13d1932c4320465ec2eec5f47edd796d
parent637ff12bcaed4833e3ce25bdca85b154fb181cb2
CEL: Protect data structures during reload and shutdown.

The CEL data structures need to be protected during a configuration reload
and shutdown.  Asterisk crashed during a shutdown because CEL events were
still in flight and the CEL data structures were already destroyed.

* Protected the appset and linkedids ao2 containers using the reload_lock.
As a result appset, linkedids, and held objects don't need a lock.

* Added NULL checks before use of the appset and linkedids ao2 containers
in case the CEL module is already shutdown.

* Fixed overloading of the linkedids held objects reference count.  During
shutdown any held objects would be leaked.

* Fixed memory leak of linkedids held objects if the LINKEDID_END is not
being tracked.  The objects in the linkedids container were not removed if
the LINKEDID_END event is not used.

* Added access protection to the appset container during the CLI "cel show
status" command.

* Made CEL config reload not set defaults if the cel.conf file is invalid.

(closes issue AST-1253)
Reported by: Guenther Kelleter

Review: https://reviewboard.asterisk.org/r/3127/
........

Merged revisions 406417 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@406418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/cel.c