[asterisk-commits] file: branch file/usecnt-cleanup r54144 - in /team/file/usecnt-cleanup: chann...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 12 17:50:11 MST 2007


Author: file
Date: Mon Feb 12 18:50:10 2007
New Revision: 54144

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54144
Log:
Change channel tech registration to macro way.

Modified:
    team/file/usecnt-cleanup/channels/chan_agent.c
    team/file/usecnt-cleanup/channels/chan_alsa.c
    team/file/usecnt-cleanup/channels/chan_features.c
    team/file/usecnt-cleanup/channels/chan_gtalk.c
    team/file/usecnt-cleanup/channels/chan_iax2.c
    team/file/usecnt-cleanup/channels/chan_jingle.c
    team/file/usecnt-cleanup/channels/chan_local.c
    team/file/usecnt-cleanup/channels/chan_mgcp.c
    team/file/usecnt-cleanup/channels/chan_oss.c
    team/file/usecnt-cleanup/channels/chan_phone.c
    team/file/usecnt-cleanup/channels/chan_sip.c
    team/file/usecnt-cleanup/channels/chan_skinny.c
    team/file/usecnt-cleanup/channels/chan_zap.c
    team/file/usecnt-cleanup/include/asterisk/channel.h
    team/file/usecnt-cleanup/main/channel.c

Modified: team/file/usecnt-cleanup/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_agent.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_agent.c (original)
+++ team/file/usecnt-cleanup/channels/chan_agent.c Mon Feb 12 18:50:10 2007
@@ -2455,7 +2455,7 @@
 static int load_module(void)
 {
 	/* Make sure we can register our agent channel type */
-	if (ast_channel_register(&agent_tech, ast_module_info->self)) {
+	if (ast_channel_register(&agent_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'Agent'\n");
 		return -1;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_alsa.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_alsa.c (original)
+++ team/file/usecnt-cleanup/channels/chan_alsa.c Mon Feb 12 18:50:10 2007
@@ -1134,7 +1134,7 @@
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
-	if (ast_channel_register(&alsa_tech, ast_module_info->self)) {
+	if (ast_channel_register(&alsa_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'Console'\n");
 		return AST_MODULE_LOAD_FAILURE;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_features.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_features.c (original)
+++ team/file/usecnt-cleanup/channels/chan_features.c Mon Feb 12 18:50:10 2007
@@ -542,7 +542,7 @@
 static int load_module(void)
 {
 	/* Make sure we can register our sip channel type */
-	if (ast_channel_register(&features_tech, ast_module_info->self)) {
+	if (ast_channel_register(&features_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'Feature'\n");
 		return -1;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_gtalk.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_gtalk.c (original)
+++ team/file/usecnt-cleanup/channels/chan_gtalk.c Mon Feb 12 18:50:10 2007
@@ -1801,7 +1801,7 @@
 	ast_cli_register_multiple(gtalk_cli, sizeof(gtalk_cli) / sizeof(gtalk_cli[0]));
 
 	/* Make sure we can register our channel type */
-	if (ast_channel_register(&gtalk_tech, ast_module_info->self)) {
+	if (ast_channel_register(&gtalk_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class %s\n", gtalk_tech.type);
 		return -1;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_iax2.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_iax2.c (original)
+++ team/file/usecnt-cleanup/channels/chan_iax2.c Mon Feb 12 18:50:10 2007
@@ -10152,7 +10152,7 @@
 	if(set_config(config, 0) == -1)
 		return AST_MODULE_LOAD_DECLINE;
 
- 	if (ast_channel_register(&iax2_tech, ast_module_info->self)) {
+ 	if (ast_channel_register(&iax2_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class %s\n", "IAX2");
 		__unload_module();
 		return AST_MODULE_LOAD_FAILURE;

Modified: team/file/usecnt-cleanup/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_jingle.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_jingle.c (original)
+++ team/file/usecnt-cleanup/channels/chan_jingle.c Mon Feb 12 18:50:10 2007
@@ -1686,7 +1686,7 @@
 	ast_rtp_proto_register(&jingle_rtp);
 
 	/* Make sure we can register our channel type */
-	if (ast_channel_register(&jingle_tech, ast_module_info->self)) {
+	if (ast_channel_register(&jingle_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class %s\n", type);
 		return -1;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_local.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_local.c (original)
+++ team/file/usecnt-cleanup/channels/chan_local.c Mon Feb 12 18:50:10 2007
@@ -668,7 +668,7 @@
 static int load_module(void)
 {
 	/* Make sure we can register our channel type */
-	if (ast_channel_register(&local_tech, ast_module_info->self)) {
+	if (ast_channel_register(&local_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'Local'\n");
 		return -1;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_mgcp.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_mgcp.c (original)
+++ team/file/usecnt-cleanup/channels/chan_mgcp.c Mon Feb 12 18:50:10 2007
@@ -4269,7 +4269,7 @@
 		return AST_MODULE_LOAD_DECLINE;
 
 	/* Make sure we can register our mgcp channel type */
-	if (ast_channel_register(&mgcp_tech, ast_module_info->self)) {
+	if (ast_channel_register(&mgcp_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'MGCP'\n");
 		io_context_destroy(io);
 		sched_context_destroy(sched);
@@ -4345,7 +4345,7 @@
 	} else {
 		ast_log(LOG_WARNING, "Unable to lock the monitor\n");
 		/* We always want to leave this in a consistent state */
-		ast_channel_register(&mgcp_tech, ast_module_info->self);
+		ast_channel_register(&mgcp_tech);
 		mgcp_reloading = 0;
 		mgcp_reload(0, 0, NULL);
 		return -1;
@@ -4363,7 +4363,7 @@
 	} else {
 		ast_log(LOG_WARNING, "Unable to lock the gateways list.\n");
 		/* We always want to leave this in a consistent state */
-		ast_channel_register(&mgcp_tech, ast_module_info->self);
+		ast_channel_register(&mgcp_tech);
 		/* Allow the monitor to restart */
 		monitor_thread = AST_PTHREADT_NULL;
 		mgcp_reloading = 0;

Modified: team/file/usecnt-cleanup/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_oss.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_oss.c (original)
+++ team/file/usecnt-cleanup/channels/chan_oss.c Mon Feb 12 18:50:10 2007
@@ -1607,7 +1607,7 @@
 		return AST_MODULE_LOAD_FAILURE;
 	}
 
-	if (ast_channel_register(&oss_tech, ast_module_info->self)) {
+	if (ast_channel_register(&oss_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel type 'OSS'\n");
 		return AST_MODULE_LOAD_FAILURE;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_phone.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_phone.c (original)
+++ team/file/usecnt-cleanup/channels/chan_phone.c Mon Feb 12 18:50:10 2007
@@ -1454,7 +1454,7 @@
 
 	/* Make sure we can register our Adtranphone channel type */
 
-	if (ast_channel_register(cur_tech, ast_module_info->self)) {
+	if (ast_channel_register(cur_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'Phone'\n");
 		ast_config_destroy(cfg);
 		__unload_module();

Modified: team/file/usecnt-cleanup/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_sip.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_sip.c (original)
+++ team/file/usecnt-cleanup/channels/chan_sip.c Mon Feb 12 18:50:10 2007
@@ -17624,7 +17624,7 @@
 		return AST_MODULE_LOAD_DECLINE;
 
 	/* Make sure we can register our sip channel type */
-	if (ast_channel_register(&sip_tech, ast_module_info->self)) {
+	if (ast_channel_register(&sip_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel type 'SIP'\n");
 		io_context_destroy(io);
 		sched_context_destroy(sched);

Modified: team/file/usecnt-cleanup/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_skinny.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_skinny.c (original)
+++ team/file/usecnt-cleanup/channels/chan_skinny.c Mon Feb 12 18:50:10 2007
@@ -4612,7 +4612,7 @@
 	}
 
 	/* Make sure we can register our skinny channel type */
-	if (ast_channel_register(&skinny_tech, ast_module_info->self)) {
+	if (ast_channel_register(&skinny_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'Skinny'\n");
 		return -1;
 	}

Modified: team/file/usecnt-cleanup/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_zap.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_zap.c (original)
+++ team/file/usecnt-cleanup/channels/chan_zap.c Mon Feb 12 18:50:10 2007
@@ -12622,7 +12622,7 @@
 	/* Make sure we can register our Zap channel type */
 	if (res)
 		return AST_MODULE_LOAD_DECLINE;
-	if (ast_channel_register(&zap_tech, ast_module_info->self)) {
+	if (ast_channel_register(&zap_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel class 'Zap'\n");
 		__unload_module();
 		return -1;

Modified: team/file/usecnt-cleanup/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/include/asterisk/channel.h?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/include/asterisk/channel.h (original)
+++ team/file/usecnt-cleanup/include/asterisk/channel.h Mon Feb 12 18:50:10 2007
@@ -702,7 +702,8 @@
  * \param tech Structure defining channel technology or "type"
  * \return Returns 0 on success, -1 on failure.
  */
-int ast_channel_register(const struct ast_channel_tech *tech, struct ast_module *mod);
+#define ast_channel_register(a) __ast_channel_register(a, ast_module_info->self)
+int __ast_channel_register(const struct ast_channel_tech *tech, struct ast_module *mod);
 
 /*! \brief Unregister a channel technology 
  * \param tech Structure defining channel technology or "type" that was previously registered

Modified: team/file/usecnt-cleanup/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/main/channel.c?view=diff&rev=54144&r1=54143&r2=54144
==============================================================================
--- team/file/usecnt-cleanup/main/channel.c (original)
+++ team/file/usecnt-cleanup/main/channel.c Mon Feb 12 18:50:10 2007
@@ -398,7 +398,7 @@
 }
 
 /*! \brief Register a new telephony channel in Asterisk */
-int ast_channel_register(const struct ast_channel_tech *tech, struct ast_module *mod)
+int __ast_channel_register(const struct ast_channel_tech *tech, struct ast_module *mod)
 {
 	struct chanlist *chan;
 



More information about the asterisk-commits mailing list