[asterisk-commits] dvossel: branch dvossel/fixtheworld_phase1_step3 r302460 - in /team/dvossel/f...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 19 10:51:37 CST 2011


Author: dvossel
Date: Wed Jan 19 10:51:31 2011
New Revision: 302460

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=302460
Log:
Add locking to format containers requiring it

Modified:
    team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c
    team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c
    team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_agent.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_alsa.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_bridge.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_dahdi.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_gtalk.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_h323.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_jingle.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_oss.c
    team/dvossel/fixtheworld_phase1_step3/channels/chan_sip.c

Modified: team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c Wed Jan 19 10:51:31 2011
@@ -398,7 +398,7 @@
 	if (!(multiplexed_threads = ao2_container_alloc(MULTIPLEXED_BUCKETS, NULL, NULL))) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
-	if (!(multiplexed_bridge.format_capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(multiplexed_bridge.format_capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 	ast_format_cap_add_all_by_type(multiplexed_bridge.format_capabilities, AST_FORMAT_TYPE_AUDIO);

Modified: team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c Wed Jan 19 10:51:31 2011
@@ -99,7 +99,7 @@
 
 static int load_module(void)
 {
-	if (!(simple_bridge.format_capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(simple_bridge.format_capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 	ast_format_cap_add_all_by_type(simple_bridge.format_capabilities, AST_FORMAT_TYPE_AUDIO);

Modified: team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c Wed Jan 19 10:51:31 2011
@@ -300,7 +300,7 @@
 static int load_module(void)
 {
 	struct ast_format tmp;
-	if (!(softmix_bridge.format_capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(softmix_bridge.format_capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 #ifdef SOFTMIX_16_SUPPORT

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_agent.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_agent.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_agent.c Wed Jan 19 10:51:31 2011
@@ -2437,7 +2437,7 @@
  */
 static int load_module(void)
 {
-	if (!(agent_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(agent_tech.capabilities = ast_format_cap_alloc())) {
 		ast_log(LOG_ERROR, "ast_format_cap_alloc_nolock fail.\n");
 		return AST_MODULE_LOAD_FAILURE;
 	}

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_alsa.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_alsa.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_alsa.c Wed Jan 19 10:51:31 2011
@@ -933,7 +933,7 @@
 	struct ast_flags config_flags = { 0 };
 	struct ast_format tmpfmt;
 
-	if (!(alsa_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(alsa_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 	ast_format_cap_add(alsa_tech.capabilities, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_bridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_bridge.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_bridge.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_bridge.c Wed Jan 19 10:51:31 2011
@@ -235,7 +235,7 @@
 /*! \brief Load module into PBX, register channel */
 static int load_module(void)
 {
-	if (!(bridge_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(bridge_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c Wed Jan 19 10:51:31 2011
@@ -1470,7 +1470,7 @@
 	struct ast_format tmpfmt;
 	PaError res;
 
-	if (!(console_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(console_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 	ast_format_cap_add(console_tech.capabilities, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR16, 0));

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_dahdi.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_dahdi.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_dahdi.c Wed Jan 19 10:51:31 2011
@@ -18012,7 +18012,7 @@
 	int y;
 #endif	/* defined(HAVE_PRI) || defined(HAVE_SS7) */
 
-	if (!(dahdi_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(dahdi_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	ast_format_cap_add(dahdi_tech.capabilities, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_gtalk.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_gtalk.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_gtalk.c Wed Jan 19 10:51:31 2011
@@ -2267,10 +2267,10 @@
 	char *jabber_loaded = ast_module_helper("", "res_jabber.so", 0, 0, 0, 0);
 	struct ast_format tmpfmt;
 
-	if (!(gtalk_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(gtalk_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
-	if (!(global_capability = ast_format_cap_alloc_nolock())) {
+	if (!(global_capability = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_h323.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_h323.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_h323.c Wed Jan 19 10:51:31 2011
@@ -3338,7 +3338,7 @@
 {
 	int res;
 
-	if (!(oh323_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(oh323_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	if (!(global_options.cap = ast_format_cap_alloc_nolock())) {

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c Wed Jan 19 10:51:31 2011
@@ -14702,7 +14702,7 @@
 	int x = 0;
 	struct iax2_registry *reg = NULL;
 
-	if (!(iax2_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(iax2_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	ast_format_cap_add_all(iax2_tech.capabilities);

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_jingle.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_jingle.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_jingle.c Wed Jan 19 10:51:31 2011
@@ -1917,12 +1917,12 @@
 
 	char *jabber_loaded = ast_module_helper("", "res_jabber.so", 0, 0, 0, 0);
 
-	if (!(jingle_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(jingle_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
 	ast_format_cap_add_all_by_type(jingle_tech.capabilities, AST_FORMAT_TYPE_AUDIO);
-	if (!(global_capability = ast_format_cap_alloc_nolock())) {
+	if (!(global_capability = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 	ast_format_cap_add(global_capability, ast_format_set(&tmpfmt, AST_FORMAT_ULAW, 0));

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c Wed Jan 19 10:51:31 2011
@@ -1198,7 +1198,7 @@
 /*! \brief Load module into PBX, register channel */
 static int load_module(void)
 {
-	if (!(local_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(local_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	ast_format_cap_add_all(local_tech.capabilities);

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_oss.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_oss.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_oss.c Wed Jan 19 10:51:31 2011
@@ -1466,7 +1466,7 @@
 		return AST_MODULE_LOAD_FAILURE;
 	}
 
-	if (!(oss_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(oss_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	ast_format_cap_add(oss_tech.capabilities, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));

Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_sip.c?view=diff&rev=302460&r1=302459&r2=302460
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_sip.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_sip.c Wed Jan 19 10:51:31 2011
@@ -29041,7 +29041,7 @@
 {
 	ast_verbose("SIP channel loading...\n");
 
-	if (!(sip_tech.capabilities = ast_format_cap_alloc_nolock())) {
+	if (!(sip_tech.capabilities = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	/* the fact that ao2_containers can't resize automatically is a major worry! */
@@ -29053,7 +29053,7 @@
 	dialogs_rtpcheck = ao2_t_container_alloc(HASH_DIALOG_SIZE, dialog_hash_cb, dialog_cmp_cb, "allocate dialogs for rtpchecks");
 	threadt = ao2_t_container_alloc(HASH_DIALOG_SIZE, threadt_hash_cb, threadt_cmp_cb, "allocate threadt table");
 
-	if (!(sip_cfg.caps = ast_format_cap_alloc_nolock())) {
+	if (!(sip_cfg.caps = ast_format_cap_alloc())) {
 		return AST_MODULE_LOAD_FAILURE;
 	}
 	ast_format_cap_add_all_by_type(sip_tech.capabilities, AST_FORMAT_TYPE_AUDIO);




More information about the asterisk-commits mailing list