[svn-commits] file: trunk r431115 - in /trunk: ./ res/parking/parking_manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jan 27 05:48:00 CST 2015


Author: file
Date: Tue Jan 27 05:47:57 2015
New Revision: 431115

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431115
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/
........

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

Modified:
    trunk/   (props changed)
    trunk/res/parking/parking_manager.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/parking/parking_manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/parking/parking_manager.c?view=diff&rev=431115&r1=431114&r2=431115
==============================================================================
--- trunk/res/parking/parking_manager.c (original)
+++ trunk/res/parking/parking_manager.c Tue Jan 27 05:47:57 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 svn-commits mailing list