]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stasis: Fix crash at shutdown.
authorBen Ford <bford@digium.com>
Tue, 23 Apr 2019 14:47:45 +0000 (09:47 -0500)
committerBen Ford <bford@digium.com>
Wed, 24 Apr 2019 13:47:35 +0000 (08:47 -0500)
commit4589260961b90393f470151cc413d53c0baf5565
treeb0a349ca9c95ffaf5048c0c38fd52d6f199bb951
parent94bbd75745f93236a10d7dff5d77493bd6d63059
stasis: Fix crash at shutdown.

When compiling in dev mode, stasis statistics are enabled and can cause
a crash at shutdown due to the following:
- Containers are freed
- Topics and subscriptions remain
- When those topics and subscriptions are deallocated, they go to do
  things with the container

This changes the containers to global ao2 objects, and whenever needed
in the code, a reference must be obtained and checked before any
operations can be done.

ASTERISK-28353 #close

Change-Id: Ie7d5e907fcfcb4d65bd36d5e4eb923126fde8d33
main/stasis.c