[asterisk-commits] file: branch 13 r431114 - /branches/13/res/parking/parking_manager.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 27 05:47:16 CST 2015
Author: file
Date: Tue Jan 27 05:47:02 2015
New Revision: 431114
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431114
Log:
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/
Modified:
branches/13/res/parking/parking_manager.c
Modified: branches/13/res/parking/parking_manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/parking/parking_manager.c?view=diff&rev=431114&r1=431113&r2=431114
==============================================================================
--- branches/13/res/parking/parking_manager.c (original)
+++ branches/13/res/parking/parking_manager.c Tue Jan 27 05:47:02 2015
@@ -689,7 +689,7 @@
static void parking_manager_disable_stasis(void)
{
- parking_sub = stasis_unsubscribe(parking_sub);
+ parking_sub = stasis_unsubscribe_and_join(parking_sub);
}
void unload_parking_manager(void)
More information about the asterisk-commits
mailing list