]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_parking: Fix crash due to race condition when unloading.
authorJoshua Colp <jcolp@digium.com>
Tue, 27 Jan 2015 11:48:31 +0000 (11:48 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 27 Jan 2015 11:48:31 +0000 (11:48 +0000)
commit9a324112ef872d8926e15de6937c1dfab67a8e0a
treeb225f23d0db10e4afceafde7bcebfb7ffa4e2545
parent1f06f7759c1a3587e0de80d350ec129c53933a34
res_parking: Fix crash due to race condition when unloading.

There is currently a race condition when unloading the res_parking
module. Depending on the will of the universe the subscription
invocation may occur AFTER the module is unloaded. This is because
the module does NOT use stasis_unsubscribe_and_join when terminating
the subscription. It merely uses stasis_unsubscribe.

This change makes it use stasis_unsubscribe_and_join which is documented
for usage in this exact scenario.

AST-1520 #close

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/13.1@431116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/parking/parking_manager.c