res/res_stasis: Fix crash on module unload while performing operation
authorMatthew Jordan <mjordan@digium.com>
Sun, 2 Nov 2014 01:01:52 +0000 (01:01 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sun, 2 Nov 2014 01:01:52 +0000 (01:01 +0000)
commit5db1c978e33de81ba887a5b6e01be3b9fb622728
tree0b5a1425c8c016d01e2af18cba678ded530743ce
parent4219c40775ee89ae3d9b4218ebcf4bbded18ec23
res/res_stasis: Fix crash on module unload while performing operation

When the res_stasis module is unloaded, it will dispose of the apps_registry
container. This is a problem if an ARI operation is in flight that attempts
to use the registry, as the shutdown occurs in a separate thread. This patch
adds some sanity checks to the various routines that access the registry which
cause the operations to fail if the apps_registry does not exist.

Crash caught by the Asterisk Test Suite.
........

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

Merged revisions 426996 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_stasis.c