aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-15 17:34:30 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-15 17:34:30 +0000
commit5fa0b7c277ad400a1029e71d51e83817414129a5 (patch)
treefe279b2c51ac4293291cc172302c80d3d642c06f /res
parentabe57aceecf9e190035245a8d7e735b7acc8e538 (diff)
More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200620 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_calendar.c18
-rw-r--r--res/res_calendar_caldav.c4
-rw-r--r--res/res_calendar_exchange.c4
-rw-r--r--res/res_calendar_icalendar.c4
-rw-r--r--res/res_config_pgsql.c4
-rw-r--r--res/res_jabber.c4
-rw-r--r--res/res_smdi.c2
-rw-r--r--res/res_snmp.c2
8 files changed, 21 insertions, 21 deletions
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;