From 82fb56886e20e6ed5e97058e68fb32c88029f060 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Mon, 15 Jun 2009 17:34:30 +0000 Subject: More 'static' qualifiers on module global variables. The 'pglobal' tool is quite handy indeed :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_calendar.c | 18 +++++++++--------- res/res_calendar_caldav.c | 4 ++-- res/res_calendar_exchange.c | 4 ++-- res/res_calendar_icalendar.c | 4 ++-- res/res_config_pgsql.c | 4 ++-- res/res_jabber.c | 4 ++-- res/res_smdi.c | 2 +- res/res_snmp.c | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) (limited to 'res') diff --git a/res/res_calendar.c b/res/res_calendar.c index 710acc2f4..8e8156d13 100644 --- a/res/res_calendar.c +++ b/res/res_calendar.c @@ -187,10 +187,10 @@ struct evententry { AST_LIST_ENTRY(evententry) list; }; -AST_LIST_HEAD_STATIC(techs, ast_calendar_tech); +static AST_LIST_HEAD_STATIC(techs, ast_calendar_tech); AST_LIST_HEAD_NOLOCK(eventlist, evententry); /* define the type */ -struct ast_config *calendar_config = NULL; +struct ast_config *ast_calendar_config; static struct ast_calendar *unref_calendar(struct ast_calendar *cal) { @@ -390,22 +390,22 @@ static int load_tech_calendars(struct ast_calendar_tech *tech) const char *cat = NULL; const char *val; - if (!calendar_config) { + if (!ast_calendar_config) { ast_log(LOG_WARNING, "Calendar support disabled, not loading %s calendar module\n", tech->type); return -1; } - while ((cat = ast_category_browse(calendar_config, cat))) { + while ((cat = ast_category_browse(ast_calendar_config, cat))) { if (!strcasecmp(cat, "general")) { continue; } - if (!(val = ast_variable_retrieve(calendar_config, cat, "type")) || strcasecmp(val, tech->type)) { + if (!(val = ast_variable_retrieve(ast_calendar_config, cat, "type")) || strcasecmp(val, tech->type)) { continue; } /* A serious error occurred loading calendars from this tech and it should be disabled */ - if (!(cal = build_calendar(calendar_config, cat, tech))) { + if (!(cal = build_calendar(ast_calendar_config, cat, tech))) { ast_calendar_unregister(tech); return -1; } @@ -862,11 +862,11 @@ static int load_config(void *data) return 0; } - if (calendar_config) { - ast_config_destroy(calendar_config); + if (ast_calendar_config) { + ast_config_destroy(ast_calendar_config); } - calendar_config = tmpcfg; + ast_calendar_config = tmpcfg; return 0; } diff --git a/res/res_calendar_caldav.c b/res/res_calendar_caldav.c index 57e2575d0..64f8f2aa1 100644 --- a/res/res_calendar_caldav.c +++ b/res/res_calendar_caldav.c @@ -540,7 +540,7 @@ static void *caldav_load_calendar(void *void_data) struct ast_calendar *cal = void_data; ast_mutex_t refreshlock; - if (!(cal && calendar_config)) { + if (!(cal && ast_calendar_config)) { ast_log(LOG_ERROR, "You must enable calendar support for res_caldav to load\n"); return NULL; } @@ -575,7 +575,7 @@ static void *caldav_load_calendar(void *void_data) return NULL; } - for (v = ast_variable_browse(calendar_config, cal->name); v; v = v->next) { + for (v = ast_variable_browse(ast_calendar_config, cal->name); v; v = v->next) { if (!strcasecmp(v->name, "url")) { ast_string_field_set(pvt, url, v->value); } else if (!strcasecmp(v->name, "user")) { diff --git a/res/res_calendar_exchange.c b/res/res_calendar_exchange.c index ec539e8e2..0b4e661e2 100644 --- a/res/res_calendar_exchange.c +++ b/res/res_calendar_exchange.c @@ -623,7 +623,7 @@ static void *exchangecal_load_calendar(void *void_data) struct ast_calendar *cal = void_data; ast_mutex_t refreshlock; - if (!(cal && calendar_config)) { + if (!(cal && ast_calendar_config)) { ast_log(LOG_ERROR, "You must enable calendar support for res_exchangecal to load\n"); return NULL; } @@ -658,7 +658,7 @@ static void *exchangecal_load_calendar(void *void_data) return NULL; } - for (v = ast_variable_browse(calendar_config, cal->name); v; v = v->next) { + for (v = ast_variable_browse(ast_calendar_config, cal->name); v; v = v->next) { if (!strcasecmp(v->name, "url")) { ast_string_field_set(pvt, url, v->value); } else if (!strcasecmp(v->name, "user")) { diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c index a5994ec66..86024b27a 100644 --- a/res/res_calendar_icalendar.c +++ b/res/res_calendar_icalendar.c @@ -328,7 +328,7 @@ static void *ical_load_calendar(void *void_data) struct ast_calendar *cal = void_data; ast_mutex_t refreshlock; - if (!(cal && calendar_config)) { + if (!(cal && ast_calendar_config)) { ast_log(LOG_ERROR, "You must enable calendar support for res_icalendar to load\n"); return NULL; } @@ -362,7 +362,7 @@ static void *ical_load_calendar(void *void_data) return NULL; } - for (v = ast_variable_browse(calendar_config, cal->name); v; v = v->next) { + for (v = ast_variable_browse(ast_calendar_config, cal->name); v; v = v->next) { if (!strcasecmp(v->name, "url")) { ast_string_field_set(pvt, url, v->value); } else if (!strcasecmp(v->name, "user")) { diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 609f0b2ae..f4f42e6da 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -49,7 +49,7 @@ AST_THREADSTORAGE(escapebuf_buf); #define RES_CONFIG_PGSQL_CONF "res_pgsql.conf" -PGconn *pgsqlConn = NULL; +static PGconn *pgsqlConn = NULL; #define MAX_DB_OPTION_SIZE 64 @@ -84,7 +84,7 @@ static int pgsql_reconnect(const char *database); static char *handle_cli_realtime_pgsql_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); static char *handle_cli_realtime_pgsql_cache(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); -enum { RQ_WARN, RQ_CREATECLOSE, RQ_CREATECHAR } requirements; +static enum { RQ_WARN, RQ_CREATECLOSE, RQ_CREATECHAR } requirements; static struct ast_cli_entry cli_realtime[] = { AST_CLI_DEFINE(handle_cli_realtime_pgsql_status, "Shows connection information for the PostgreSQL RealTime driver"), diff --git a/res/res_jabber.c b/res/res_jabber.c index 46610fe20..c918d2e09 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -261,8 +261,8 @@ static char *app_ajisend = "JabberSend"; static char *app_ajistatus = "JabberStatus"; -struct aji_client_container clients; -struct aji_capabilities *capabilities = NULL; +static struct aji_client_container clients; +static struct aji_capabilities *capabilities = NULL; /*! \brief Global flags, initialized to default values */ static struct ast_flags globalflags = { AJI_AUTOREGISTER }; diff --git a/res/res_smdi.c b/res/res_smdi.c index 3f7149926..c37fc1eef 100644 --- a/res/res_smdi.c +++ b/res/res_smdi.c @@ -180,7 +180,7 @@ struct ast_smdi_interface { }; /*! \brief SMDI interface container. */ -struct ast_smdi_interface_container { +static struct ast_smdi_interface_container { ASTOBJ_CONTAINER_COMPONENTS(struct ast_smdi_interface); } smdi_ifaces; diff --git a/res/res_snmp.c b/res/res_snmp.c index 635330e92..4bf81a2f0 100644 --- a/res/res_snmp.c +++ b/res/res_snmp.c @@ -34,7 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") int res_snmp_agentx_subagent; int res_snmp_dont_stop; -int res_snmp_enabled; +static int res_snmp_enabled; static pthread_t thread = AST_PTHREADT_NULL; -- cgit v1.2.3