[asterisk-commits] mjordan: branch 1.8 r374316 - /branches/1.8/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 3 13:58:49 CDT 2012


Author: mjordan
Date: Wed Oct  3 13:58:45 2012
New Revision: 374316

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374316
Log:
Destroy the generic_monitors container after the core_instances in ccss

For each item in core_instances disposed of in the shutdown of ccss, any
generic monitor instances referenced by the objects will be removed from
generic_monitors during their destruction.  Hilarity ensues if
generic_monitors no longer exists.

Thanks to the Asterisk Test Suite's generic_ccss test for complaining loudly
when it ran into this.


Modified:
    branches/1.8/main/ccss.c

Modified: branches/1.8/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/ccss.c?view=diff&rev=374316&r1=374315&r2=374316
==============================================================================
--- branches/1.8/main/ccss.c (original)
+++ branches/1.8/main/ccss.c Wed Oct  3 13:58:45 2012
@@ -4324,13 +4324,14 @@
 	if (cc_core_taskprocessor) {
 		cc_core_taskprocessor = ast_taskprocessor_unreference(cc_core_taskprocessor);
 	}
+	/* Note that cc_core_instances must be disposed of prior to generic_monitors */
+	if (cc_core_instances) {
+		ao2_t_ref(cc_core_instances, -1, "Unref cc_core_instances container in cc_shutdown");
+		cc_core_instances = NULL;
+	}
 	if (generic_monitors) {
 		ao2_t_ref(generic_monitors, -1, "Unref generic_monitor container in cc_shutdown");
 		generic_monitors = NULL;
-	}
-	if (cc_core_instances) {
-		ao2_t_ref(cc_core_instances, -1, "Unref cc_core_instances container in cc_shutdown");
-		cc_core_instances = NULL;
 	}
 }
 




More information about the asterisk-commits mailing list