manager: Protect data structures during shutdown.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 24 Jan 2014 18:13:31 +0000 (18:13 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 24 Jan 2014 18:13:31 +0000 (18:13 +0000)
commit82cce81737c58b4ada4fba9656924366c55ba2d8
treec664bcff7970d7b796bd50a0b67ea9fea37cc556
parent799fc2493ef5e74fbd7b040d56e1f864323995d0
manager: Protect data structures during shutdown.

Occasionally, the manager module would get an "INTERNAL_OBJ: bad magic
number" error on a "core restart gracefully" command if an AMI connection
is established.

* Added ao2_global_obj protection to the sessions global container.

* Fixed the order of unreferencing a session object in session_destroy().

* Removed unnecessary container traversals of the white/black filters
during session_destructor().

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

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

Merged revisions 406341 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 406342 from http://svn.asterisk.org/svn/asterisk/branches/12

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