[asterisk-commits] file: branch certified-13.1 r431116 - in /certified/branches/13.1: ./ res/par...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 27 05:48:35 CST 2015


Author: file
Date: Tue Jan 27 05:48:31 2015
New Revision: 431116

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431116
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:
    certified/branches/13.1/   (props changed)
    certified/branches/13.1/res/parking/parking_manager.c

Propchange: certified/branches/13.1/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: certified/branches/13.1/res/parking/parking_manager.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/res/parking/parking_manager.c?view=diff&rev=431116&r1=431115&r2=431116
==============================================================================
--- certified/branches/13.1/res/parking/parking_manager.c (original)
+++ certified/branches/13.1/res/parking/parking_manager.c Tue Jan 27 05:48:31 2015
@@ -685,7 +685,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