aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--cdr/cdr_manager.c2
-rw-r--r--formats/format_wav_gsm.c2
-rw-r--r--funcs/func_cdr.c4
-rw-r--r--funcs/func_channel.c2
-rw-r--r--funcs/func_curl.c4
-rw-r--r--funcs/func_cut.c4
-rw-r--r--funcs/func_enum.c4
-rw-r--r--funcs/func_lock.c2
-rw-r--r--funcs/func_odbc.c8
-rw-r--r--funcs/func_realtime.c10
-rw-r--r--funcs/func_vmcount.c2
-rw-r--r--include/asterisk/calendar.h2
-rw-r--r--main/cli.c2
-rw-r--r--main/db.c2
-rw-r--r--main/devicestate.c2
-rw-r--r--main/event.c2
-rw-r--r--main/features.c14
-rw-r--r--main/file.c2
-rw-r--r--main/http.c2
-rw-r--r--main/image.c2
-rw-r--r--main/loader.c2
-rw-r--r--main/logger.c2
-rw-r--r--main/manager.c14
-rw-r--r--main/xmldoc.c2
-rw-r--r--pbx/pbx_dundi.c2
-rw-r--r--pbx/pbx_lua.c4
-rw-r--r--pbx/pbx_realtime.c4
-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
35 files changed, 73 insertions, 73 deletions
diff --git a/cdr/cdr_manager.c b/cdr/cdr_manager.c
index aff60d355..49f826d9e 100644
--- a/cdr/cdr_manager.c
+++ b/cdr/cdr_manager.c
@@ -46,7 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *name = "cdr_manager";
static int enablecdr = 0;
-struct ast_str *customfields;
+static struct ast_str *customfields;
static int manager_log(struct ast_cdr *cdr);
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index 737be96d7..aa3dd2eee 100644
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -48,7 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define MSGSM_SAMPLES (2*GSM_SAMPLES) /* samples in an MSGSM block */
/* begin binary data: */
-char msgsm_silence[] = /* 65 */
+static char msgsm_silence[] = /* 65 */
{0x48,0x17,0xD6,0x84,0x02,0x80,0x24,0x49,0x92,0x24,0x89,0x02,0x80,0x24,0x49
,0x92,0x24,0x89,0x02,0x80,0x24,0x49,0x92,0x24,0x89,0x02,0x80,0x24,0x49,0x92
,0x24,0x09,0x82,0x74,0x61,0x4D,0x28,0x00,0x48,0x92,0x24,0x49,0x92,0x28,0x00
diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c
index 6c80e4f93..2e55d7a0b 100644
--- a/funcs/func_cdr.c
+++ b/funcs/func_cdr.c
@@ -163,12 +163,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</function>
***/
-enum {
+enum cdr_option_flags {
OPT_RECURSIVE = (1 << 0),
OPT_UNPARSED = (1 << 1),
OPT_LAST = (1 << 2),
OPT_SKIPLOCKED = (1 << 3),
-} cdr_option_flags;
+};
AST_APP_OPTIONS(cdr_func_options, {
AST_APP_OPTION('l', OPT_LAST),
diff --git a/funcs/func_channel.c b/funcs/func_channel.c
index b4aa23dd8..5d81ad980 100644
--- a/funcs/func_channel.c
+++ b/funcs/func_channel.c
@@ -227,7 +227,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
ast_channel_unlock(chan); \
} while (0)
-char *transfercapability_table[0x20] = {
+static const char * const transfercapability_table[0x20] = {
"SPEECH", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
"DIGITAL", "RESTRICTED_DIGITAL", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
"3K1AUDIO", "DIGITAL_W_TONES", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index 482502558..96af9b468 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -569,7 +569,7 @@ static int acf_curl2_exec(struct ast_channel *chan, const char *cmd, char *info,
return acf_curl_helper(chan, cmd, info, NULL, buf, len);
}
-struct ast_custom_function acf_curl = {
+static struct ast_custom_function acf_curl = {
.name = "CURL",
.synopsis = "Retrieves the contents of a URL",
.syntax = "CURL(url[,post-data])",
@@ -580,7 +580,7 @@ struct ast_custom_function acf_curl = {
.read2 = acf_curl2_exec,
};
-struct ast_custom_function acf_curlopt = {
+static struct ast_custom_function acf_curlopt = {
.name = "CURLOPT",
.synopsis = "Set options for use with the CURL() function",
.syntax = "CURLOPT(<option>)",
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index 9c7c530f4..bd88fc2e9 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -305,12 +305,12 @@ static int acf_cut_exec2(struct ast_channel *chan, const char *cmd, char *data,
return ret;
}
-struct ast_custom_function acf_sort = {
+static struct ast_custom_function acf_sort = {
.name = "SORT",
.read = acf_sort_exec,
};
-struct ast_custom_function acf_cut = {
+static struct ast_custom_function acf_cut = {
.name = "CUT",
.read = acf_cut_exec,
.read2 = acf_cut_exec2,
diff --git a/funcs/func_enum.c b/funcs/func_enum.c
index 525c935f6..698962135 100644
--- a/funcs/func_enum.c
+++ b/funcs/func_enum.c
@@ -216,7 +216,7 @@ static int function_enum(struct ast_channel *chan, const char *cmd, char *data,
return 0;
}
-unsigned int enum_datastore_id;
+static unsigned int enum_datastore_id;
struct enum_result_datastore {
struct enum_context *context;
@@ -243,7 +243,7 @@ static void erds_destroy_cb(void *data)
erds_destroy(erds);
}
-const struct ast_datastore_info enum_result_datastore_info = {
+static const struct ast_datastore_info enum_result_datastore_info = {
.type = "ENUMQUERY",
.destroy = erds_destroy_cb,
};
diff --git a/funcs/func_lock.c b/funcs/func_lock.c
index de8377a9c..1d2f8940e 100644
--- a/funcs/func_lock.c
+++ b/funcs/func_lock.c
@@ -84,7 +84,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-AST_LIST_HEAD_STATIC(locklist, lock_frame);
+static AST_LIST_HEAD_STATIC(locklist, lock_frame);
static void lock_free(void *data);
static int unloading = 0;
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index 85fdd09b4..8bb744f62 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -99,10 +99,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *config = "func_odbc.conf";
-enum {
+enum odbc_option_flags {
OPT_ESCAPECOMMAS = (1 << 0),
OPT_MULTIROW = (1 << 1),
-} odbc_option_flags;
+};
struct acf_odbc_query {
AST_RWLIST_ENTRY(acf_odbc_query) list;
@@ -118,7 +118,7 @@ struct acf_odbc_query {
static void odbc_datastore_free(void *data);
-struct ast_datastore_info odbc_info = {
+static struct ast_datastore_info odbc_info = {
.type = "FUNC_ODBC",
.destroy = odbc_datastore_free,
};
@@ -135,7 +135,7 @@ struct odbc_datastore {
char names[0];
};
-AST_RWLIST_HEAD_STATIC(queries, acf_odbc_query);
+static AST_RWLIST_HEAD_STATIC(queries, acf_odbc_query);
static int resultcount = 0;
diff --git a/funcs/func_realtime.c b/funcs/func_realtime.c
index 065864511..b451f72ca 100644
--- a/funcs/func_realtime.c
+++ b/funcs/func_realtime.c
@@ -410,29 +410,29 @@ static int function_realtime_readdestroy(struct ast_channel *chan, const char *c
return 0;
}
-struct ast_custom_function realtime_function = {
+static struct ast_custom_function realtime_function = {
.name = "REALTIME",
.read = function_realtime_read,
.write = function_realtime_write,
};
-struct ast_custom_function realtimefield_function = {
+static struct ast_custom_function realtimefield_function = {
.name = "REALTIME_FIELD",
.read = realtimefield_read,
.write = function_realtime_write,
};
-struct ast_custom_function realtimehash_function = {
+static struct ast_custom_function realtimehash_function = {
.name = "REALTIME_HASH",
.read = realtimefield_read,
};
-struct ast_custom_function realtime_store_function = {
+static struct ast_custom_function realtime_store_function = {
.name = "REALTIME_STORE",
.write = function_realtime_store,
};
-struct ast_custom_function realtime_destroy_function = {
+static struct ast_custom_function realtime_destroy_function = {
.name = "REALTIME_DESTROY",
.read = function_realtime_readdestroy,
};
diff --git a/funcs/func_vmcount.c b/funcs/func_vmcount.c
index 550070891..f409e75ce 100644
--- a/funcs/func_vmcount.c
+++ b/funcs/func_vmcount.c
@@ -94,7 +94,7 @@ static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *arg
return 0;
}
-struct ast_custom_function acf_vmcount = {
+static struct ast_custom_function acf_vmcount = {
.name = "VMCOUNT",
.read = acf_vmcount_exec,
.read_max = 12,
diff --git a/include/asterisk/calendar.h b/include/asterisk/calendar.h
index f585f9c58..dd14f963a 100644
--- a/include/asterisk/calendar.h
+++ b/include/asterisk/calendar.h
@@ -60,7 +60,7 @@
* to unregister that module's calendar type (usually done in module_unload())
*/
-extern struct ast_config *calendar_config;
+extern struct ast_config *ast_calendar_config;
struct ast_calendar;
struct ast_calendar_event;
diff --git a/main/cli.c b/main/cli.c
index 1bfe263f0..d1d4bb3a2 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -74,7 +74,7 @@ static int cli_default_perm = 1;
* it is already running. */
AST_MUTEX_DEFINE_STATIC(permsconfiglock);
/*! \brief List of users and permissions. */
-AST_RWLIST_HEAD_STATIC(cli_perms, usergroup_cli_perm);
+static AST_RWLIST_HEAD_STATIC(cli_perms, usergroup_cli_perm);
/*!
* \brief map a debug or verbose value to a filename
diff --git a/main/db.c b/main/db.c
index 244288a19..3ccd827f5 100644
--- a/main/db.c
+++ b/main/db.c
@@ -594,7 +594,7 @@ void ast_db_freetree(struct ast_db_entry *dbe)
}
}
-struct ast_cli_entry cli_database[] = {
+static struct ast_cli_entry cli_database[] = {
AST_CLI_DEFINE(handle_cli_database_show, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_showkey, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_get, "Gets database value"),
diff --git a/main/devicestate.c b/main/devicestate.c
index fb5bd6760..17178faf2 100644
--- a/main/devicestate.c
+++ b/main/devicestate.c
@@ -190,7 +190,7 @@ struct devstate_change {
char device[1];
};
-struct {
+static struct {
pthread_t thread;
struct ast_event_sub *event_sub;
ast_cond_t cond;
diff --git a/main/event.c b/main/event.c
index 483d47832..3370cf8b3 100644
--- a/main/event.c
+++ b/main/event.c
@@ -39,7 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/taskprocessor.h"
#include "asterisk/astobj2.h"
-struct ast_taskprocessor *event_dispatcher;
+static struct ast_taskprocessor *event_dispatcher;
/*!
* \brief An event information element
diff --git a/main/features.c b/main/features.c
index d4a5e5db6..664c6c87b 100644
--- a/main/features.c
+++ b/main/features.c
@@ -339,17 +339,17 @@ static void *dial_features_duplicate(void *data)
memcpy(df_copy, df, sizeof(*df));
return df_copy;
- }
-
- static void dial_features_destroy(void *data)
- {
+}
+
+static void dial_features_destroy(void *data)
+{
struct ast_dial_features *df = data;
if (df) {
ast_free(df);
}
- }
-
- const struct ast_datastore_info dial_features_info = {
+}
+
+static const struct ast_datastore_info dial_features_info = {
.type = "dial-features",
.destroy = dial_features_destroy,
.duplicate = dial_features_duplicate,
diff --git a/main/file.c b/main/file.c
index 3c60d4244..cfeb2d1a9 100644
--- a/main/file.c
+++ b/main/file.c
@@ -1365,7 +1365,7 @@ static char *handle_cli_core_show_file_formats(struct ast_cli_entry *e, int cmd,
#undef FORMAT2
}
-struct ast_cli_entry cli_file[] = {
+static struct ast_cli_entry cli_file[] = {
AST_CLI_DEFINE(handle_cli_core_show_file_formats, "Displays file formats")
};
diff --git a/main/http.c b/main/http.c
index f99c03e91..a5dd568bf 100644
--- a/main/http.c
+++ b/main/http.c
@@ -116,7 +116,7 @@ struct http_uri_redirect {
static AST_RWLIST_HEAD_STATIC(uri_redirects, http_uri_redirect);
-const struct ast_cfhttp_methods_text {
+static const struct ast_cfhttp_methods_text {
enum ast_http_method method;
const char text[];
} ast_http_methods_text[] = {
diff --git a/main/image.c b/main/image.c
index 8ecea603b..5da07ce06 100644
--- a/main/image.c
+++ b/main/image.c
@@ -197,7 +197,7 @@ static char *handle_core_show_image_formats(struct ast_cli_entry *e, int cmd, st
return CLI_SUCCESS;
}
-struct ast_cli_entry cli_image[] = {
+static struct ast_cli_entry cli_image[] = {
AST_CLI_DEFINE(handle_core_show_image_formats, "Displays image formats")
};
diff --git a/main/loader.c b/main/loader.c
index 48e9bbb22..45b66612e 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -125,7 +125,7 @@ static AST_LIST_HEAD_STATIC(reload_queue, reload_queue_item);
need to know what filename the module was loaded from while it
is being registered
*/
-struct ast_module *resource_being_loaded;
+static struct ast_module *resource_being_loaded;
/* XXX: should we check for duplicate resource names here? */
diff --git a/main/logger.c b/main/logger.c
index 2c1d9ab17..75b89f428 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -97,7 +97,7 @@ static char exec_after_rotate[256] = "";
static int filesize_reload_needed;
static unsigned int global_logmask = 0xFFFF;
-enum rotatestrategy {
+static enum rotatestrategy {
SEQUENTIAL = 1 << 0, /* Original method - create a new file, in order */
ROTATE = 1 << 1, /* Rotate all files, such that the oldest file has the highest suffix */
TIMESTAMP = 1 << 2, /* Append the epoch timestamp onto the end of the archived file */
diff --git a/main/manager.c b/main/manager.c
index 70c855b23..10087fcca 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -5006,7 +5006,7 @@ static int rawman_http_callback(struct ast_tcptls_session_instance *ser, const s
return generic_http_callback(ser, method, FORMAT_RAW, &ser->remote_address, uri, get_params, headers);
}
-struct ast_http_uri rawmanuri = {
+static struct ast_http_uri rawmanuri = {
.description = "Raw HTTP Manager Event Interface",
.uri = "rawman",
.callback = rawman_http_callback,
@@ -5014,7 +5014,7 @@ struct ast_http_uri rawmanuri = {
.key = __FILE__,
};
-struct ast_http_uri manageruri = {
+static struct ast_http_uri manageruri = {
.description = "HTML Manager Event Interface",
.uri = "manager",
.callback = manager_http_callback,
@@ -5022,7 +5022,7 @@ struct ast_http_uri manageruri = {
.key = __FILE__,
};
-struct ast_http_uri managerxmluri = {
+static struct ast_http_uri managerxmluri = {
.description = "XML Manager Event Interface",
.uri = "mxml",
.callback = mxml_http_callback,
@@ -5047,7 +5047,7 @@ static int auth_rawman_http_callback(struct ast_tcptls_session_instance *ser, co
return auth_http_callback(ser, method, FORMAT_RAW, &ser->remote_address, uri, get_params, headers);
}
-struct ast_http_uri arawmanuri = {
+static struct ast_http_uri arawmanuri = {
.description = "Raw HTTP Manager Event Interface w/Digest authentication",
.uri = "arawman",
.has_subtree = 0,
@@ -5056,7 +5056,7 @@ struct ast_http_uri arawmanuri = {
.key = __FILE__,
};
-struct ast_http_uri amanageruri = {
+static struct ast_http_uri amanageruri = {
.description = "HTML Manager Event Interface w/Digest authentication",
.uri = "amanager",
.has_subtree = 0,
@@ -5065,7 +5065,7 @@ struct ast_http_uri amanageruri = {
.key = __FILE__,
};
-struct ast_http_uri amanagerxmluri = {
+static struct ast_http_uri amanagerxmluri = {
.description = "XML Manager Event Interface w/Digest authentication",
.uri = "amxml",
.has_subtree = 0,
@@ -5086,7 +5086,7 @@ static void purge_old_stuff(void *data)
purge_events();
}
-struct ast_tls_config ami_tls_cfg;
+static struct ast_tls_config ami_tls_cfg;
static struct ast_tcptls_session_args ami_desc = {
.accept_fd = -1,
.master = AST_PTHREADT_NULL,
diff --git a/main/xmldoc.c b/main/xmldoc.c
index 72625ff0e..17a756a27 100644
--- a/main/xmldoc.c
+++ b/main/xmldoc.c
@@ -1050,7 +1050,7 @@ enum syntaxtype {
};
/*! \brief Mapping between type of node and type of syntax to generate. */
-struct strsyntaxtype {
+static struct strsyntaxtype {
const char *type;
enum syntaxtype stxtype;
} stxtype[] = {
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index df3845f27..253e17d56 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -3876,7 +3876,7 @@ AST_APP_OPTIONS(dundi_query_opts, BEGIN_OPTIONS
AST_APP_OPTION('b', OPT_BYPASS_CACHE),
END_OPTIONS );
-unsigned int dundi_result_id;
+static unsigned int dundi_result_id;
struct dundi_result_datastore {
struct dundi_result results[MAX_RESULTS];
diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c
index 7bc1a8ad1..ebca7eb89 100644
--- a/pbx/pbx_lua.c
+++ b/pbx/pbx_lua.c
@@ -93,8 +93,8 @@ static int matchmore(struct ast_channel *chan, const char *context, const char *
static int exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data);
AST_MUTEX_DEFINE_STATIC(config_file_lock);
-char *config_file_data = NULL;
-long config_file_size = 0;
+static char *config_file_data = NULL;
+static long config_file_size = 0;
static struct ast_context *local_contexts = NULL;
static struct ast_hashtab *local_table = NULL;
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index 3488961c1..7db41571c 100644
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -54,9 +54,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define EXT_DATA_SIZE 256
-enum {
+enum option_flags {
OPTION_PATTERNS_DISABLED = (1 << 0),
-} option_flags;
+};
AST_APP_OPTIONS(switch_opts, {
AST_APP_OPTION('p', OPTION_PATTERNS_DISABLED),
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;