[asterisk-commits] russell: trunk r89265 - /trunk/res/res_clioriginate.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 13 20:57:14 CST 2007


Author: russell
Date: Tue Nov 13 20:57:13 2007
New Revision: 89265

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89265
Log:
- Use the ARRAY_LEN macro in a couple places
- return errors from load_module / unload_module

Modified:
    trunk/res/res_clioriginate.c

Modified: trunk/res/res_clioriginate.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_clioriginate.c?view=diff&rev=89265&r1=89264&r2=89265
==============================================================================
--- trunk/res/res_clioriginate.c (original)
+++ trunk/res/res_clioriginate.c Tue Nov 13 20:57:13 2007
@@ -182,15 +182,15 @@
 /*! \brief Unload orginate module */
 static int unload_module(void)
 {
-	ast_cli_unregister_multiple(cli_cliorig, sizeof(cli_cliorig) / sizeof(struct ast_cli_entry));
-	return 0;
+	return ast_cli_unregister_multiple(cli_cliorig, ARRAY_LEN(cli_cliorig));
 }
 
 /*! \brief Load orginate module */
 static int load_module(void)
 {
-	ast_cli_register_multiple(cli_cliorig, sizeof(cli_cliorig) / sizeof(struct ast_cli_entry));
-	return AST_MODULE_LOAD_SUCCESS;
+	int res;
+	res = ast_cli_register_multiple(cli_cliorig, ARRAY_LEN(cli_cliorig));
+	return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Call origination from the CLI");




More information about the asterisk-commits mailing list