From f699b6238345935777e65a62f73cf98dccd6050c Mon Sep 17 00:00:00 2001 From: rizzo Date: Tue, 11 Apr 2006 10:01:00 +0000 Subject: normalize code in preparation to module changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19189 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_agi.c | 7 +++---- res/res_clioriginate.c | 7 +++---- res/res_config_odbc.c | 7 +++---- res/res_config_pgsql.c | 7 +++---- res/res_convert.c | 9 +++------ res/res_crypto.c | 2 +- 6 files changed, 16 insertions(+), 23 deletions(-) diff --git a/res/res_agi.c b/res/res_agi.c index 8ff47e261..9f16c9faa 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -71,8 +71,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") /* Recycle some stuff from the CLI interface */ #define fdprintf agi_debug_cli -static char *tdesc = "Asterisk Gateway Interface (AGI)"; - static char *app = "AGI"; static char *eapp = "EAGI"; @@ -2053,7 +2051,8 @@ int load_module(void) const char *description(void) { - return tdesc; + return "Asterisk Gateway Interface (AGI)"; + } int usecount(void) @@ -2063,7 +2062,7 @@ int usecount(void) return res; } -const char *key() +const char *key(void) { return ASTERISK_GPL_KEY; } diff --git a/res/res_clioriginate.c b/res/res_clioriginate.c index 3b189cf8a..6a26bc23c 100644 --- a/res/res_clioriginate.c +++ b/res/res_clioriginate.c @@ -44,8 +44,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); STANDARD_USECOUNT_DECL; -static char *tdesc = "Call origination from the CLI"; - static char orig_help[] = " There are two ways to use this command. A call can be originated between a\n" "channel and a specific application, or between a channel and an extension in\n" @@ -177,7 +175,8 @@ int load_module(void) const char *description(void) { - return tdesc; + return "Call origination from the CLI"; + } int usecount(void) @@ -185,7 +184,7 @@ int usecount(void) return 0; } -const char *key() +const char *key(void) { return ASTERISK_GPL_KEY; } diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index febf839c5..b28059db5 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -48,8 +48,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/res_odbc.h" #include "asterisk/utils.h" -static char *tdesc = "ODBC Configuration"; - LOCAL_USER_DECL; static struct ast_variable *realtime_odbc(const char *database, const char *table, va_list ap) @@ -527,7 +525,8 @@ int load_module (void) const char *description(void) { - return tdesc; + return "ODBC Configuration"; + } int usecount (void) @@ -536,7 +535,7 @@ int usecount (void) return 1; } -const char *key() +const char *key(void) { return ASTERISK_GPL_KEY; } diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index bcb179102..cf3838654 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -41,8 +41,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/cli.h" -static char *res_config_pgsql_desc = "Postgresql RealTime Configuration Driver"; - AST_MUTEX_DEFINE_STATIC(pgsql_lock); #define RES_CONFIG_PGSQL_CONF "res_pgsql.conf" @@ -695,7 +693,8 @@ int parse_config(void) const char *description(void) { - return res_config_pgsql_desc; + return "Postgresql RealTime Configuration Driver"; + } int usecount(void) @@ -709,7 +708,7 @@ int usecount(void) return 0; } -const char *key() +const char *key(void) { return ASTERISK_GPL_KEY; } diff --git a/res/res_convert.c b/res/res_convert.c index eea93f838..be441bc4b 100644 --- a/res/res_convert.c +++ b/res/res_convert.c @@ -41,8 +41,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") STANDARD_USECOUNT_DECL; -static char *desc = "File format conversion CLI command"; - /*! \brief Split the filename to basename and extension */ static int split_ext(char *filename, char **name, char **ext) { @@ -146,19 +144,18 @@ int load_module(void) const char *description(void) { - return desc; + return "File format conversion CLI command"; + } int usecount(void) { int res; - STANDARD_USECOUNT(res); - return res; } -const char *key() +const char *key(void) { return ASTERISK_GPL_KEY; } diff --git a/res/res_crypto.c b/res/res_crypto.c index accabd16b..ea0f05ae6 100644 --- a/res/res_crypto.c +++ b/res/res_crypto.c @@ -614,7 +614,7 @@ int usecount(void) return 1; } -const char *key() +const char *key(void) { return ASTERISK_GPL_KEY; } -- cgit v1.2.3