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
This commit is contained in:
Kevin P. Fleming 2009-06-15 17:34:30 +00:00
parent 4379249674
commit 82fb56886e
35 changed files with 73 additions and 73 deletions

View File

@ -46,7 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *name = "cdr_manager"; static char *name = "cdr_manager";
static int enablecdr = 0; static int enablecdr = 0;
struct ast_str *customfields; static struct ast_str *customfields;
static int manager_log(struct ast_cdr *cdr); static int manager_log(struct ast_cdr *cdr);

View File

@ -48,7 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define MSGSM_SAMPLES (2*GSM_SAMPLES) /* samples in an MSGSM block */ #define MSGSM_SAMPLES (2*GSM_SAMPLES) /* samples in an MSGSM block */
/* begin binary data: */ /* 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 {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 ,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 ,0x24,0x09,0x82,0x74,0x61,0x4D,0x28,0x00,0x48,0x92,0x24,0x49,0x92,0x28,0x00

View File

@ -163,12 +163,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</function> </function>
***/ ***/
enum { enum cdr_option_flags {
OPT_RECURSIVE = (1 << 0), OPT_RECURSIVE = (1 << 0),
OPT_UNPARSED = (1 << 1), OPT_UNPARSED = (1 << 1),
OPT_LAST = (1 << 2), OPT_LAST = (1 << 2),
OPT_SKIPLOCKED = (1 << 3), OPT_SKIPLOCKED = (1 << 3),
} cdr_option_flags; };
AST_APP_OPTIONS(cdr_func_options, { AST_APP_OPTIONS(cdr_func_options, {
AST_APP_OPTION('l', OPT_LAST), AST_APP_OPTION('l', OPT_LAST),

View File

@ -227,7 +227,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
ast_channel_unlock(chan); \ ast_channel_unlock(chan); \
} while (0) } while (0)
char *transfercapability_table[0x20] = { static const char * const transfercapability_table[0x20] = {
"SPEECH", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "SPEECH", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
"DIGITAL", "RESTRICTED_DIGITAL", "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", "3K1AUDIO", "DIGITAL_W_TONES", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",

View File

@ -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); 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", .name = "CURL",
.synopsis = "Retrieves the contents of a URL", .synopsis = "Retrieves the contents of a URL",
.syntax = "CURL(url[,post-data])", .syntax = "CURL(url[,post-data])",
@ -580,7 +580,7 @@ struct ast_custom_function acf_curl = {
.read2 = acf_curl2_exec, .read2 = acf_curl2_exec,
}; };
struct ast_custom_function acf_curlopt = { static struct ast_custom_function acf_curlopt = {
.name = "CURLOPT", .name = "CURLOPT",
.synopsis = "Set options for use with the CURL() function", .synopsis = "Set options for use with the CURL() function",
.syntax = "CURLOPT(<option>)", .syntax = "CURLOPT(<option>)",

View File

@ -305,12 +305,12 @@ static int acf_cut_exec2(struct ast_channel *chan, const char *cmd, char *data,
return ret; return ret;
} }
struct ast_custom_function acf_sort = { static struct ast_custom_function acf_sort = {
.name = "SORT", .name = "SORT",
.read = acf_sort_exec, .read = acf_sort_exec,
}; };
struct ast_custom_function acf_cut = { static struct ast_custom_function acf_cut = {
.name = "CUT", .name = "CUT",
.read = acf_cut_exec, .read = acf_cut_exec,
.read2 = acf_cut_exec2, .read2 = acf_cut_exec2,

View File

@ -216,7 +216,7 @@ static int function_enum(struct ast_channel *chan, const char *cmd, char *data,
return 0; return 0;
} }
unsigned int enum_datastore_id; static unsigned int enum_datastore_id;
struct enum_result_datastore { struct enum_result_datastore {
struct enum_context *context; struct enum_context *context;
@ -243,7 +243,7 @@ static void erds_destroy_cb(void *data)
erds_destroy(erds); erds_destroy(erds);
} }
const struct ast_datastore_info enum_result_datastore_info = { static const struct ast_datastore_info enum_result_datastore_info = {
.type = "ENUMQUERY", .type = "ENUMQUERY",
.destroy = erds_destroy_cb, .destroy = erds_destroy_cb,
}; };

View File

@ -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 void lock_free(void *data);
static int unloading = 0; static int unloading = 0;

View File

@ -99,10 +99,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *config = "func_odbc.conf"; static char *config = "func_odbc.conf";
enum { enum odbc_option_flags {
OPT_ESCAPECOMMAS = (1 << 0), OPT_ESCAPECOMMAS = (1 << 0),
OPT_MULTIROW = (1 << 1), OPT_MULTIROW = (1 << 1),
} odbc_option_flags; };
struct acf_odbc_query { struct acf_odbc_query {
AST_RWLIST_ENTRY(acf_odbc_query) list; AST_RWLIST_ENTRY(acf_odbc_query) list;
@ -118,7 +118,7 @@ struct acf_odbc_query {
static void odbc_datastore_free(void *data); static void odbc_datastore_free(void *data);
struct ast_datastore_info odbc_info = { static struct ast_datastore_info odbc_info = {
.type = "FUNC_ODBC", .type = "FUNC_ODBC",
.destroy = odbc_datastore_free, .destroy = odbc_datastore_free,
}; };
@ -135,7 +135,7 @@ struct odbc_datastore {
char names[0]; char names[0];
}; };
AST_RWLIST_HEAD_STATIC(queries, acf_odbc_query); static AST_RWLIST_HEAD_STATIC(queries, acf_odbc_query);
static int resultcount = 0; static int resultcount = 0;

View File

@ -410,29 +410,29 @@ static int function_realtime_readdestroy(struct ast_channel *chan, const char *c
return 0; return 0;
} }
struct ast_custom_function realtime_function = { static struct ast_custom_function realtime_function = {
.name = "REALTIME", .name = "REALTIME",
.read = function_realtime_read, .read = function_realtime_read,
.write = function_realtime_write, .write = function_realtime_write,
}; };
struct ast_custom_function realtimefield_function = { static struct ast_custom_function realtimefield_function = {
.name = "REALTIME_FIELD", .name = "REALTIME_FIELD",
.read = realtimefield_read, .read = realtimefield_read,
.write = function_realtime_write, .write = function_realtime_write,
}; };
struct ast_custom_function realtimehash_function = { static struct ast_custom_function realtimehash_function = {
.name = "REALTIME_HASH", .name = "REALTIME_HASH",
.read = realtimefield_read, .read = realtimefield_read,
}; };
struct ast_custom_function realtime_store_function = { static struct ast_custom_function realtime_store_function = {
.name = "REALTIME_STORE", .name = "REALTIME_STORE",
.write = function_realtime_store, .write = function_realtime_store,
}; };
struct ast_custom_function realtime_destroy_function = { static struct ast_custom_function realtime_destroy_function = {
.name = "REALTIME_DESTROY", .name = "REALTIME_DESTROY",
.read = function_realtime_readdestroy, .read = function_realtime_readdestroy,
}; };

View File

@ -94,7 +94,7 @@ static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *arg
return 0; return 0;
} }
struct ast_custom_function acf_vmcount = { static struct ast_custom_function acf_vmcount = {
.name = "VMCOUNT", .name = "VMCOUNT",
.read = acf_vmcount_exec, .read = acf_vmcount_exec,
.read_max = 12, .read_max = 12,

View File

@ -60,7 +60,7 @@
* to unregister that module's calendar type (usually done in module_unload()) * 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;
struct ast_calendar_event; struct ast_calendar_event;

View File

@ -74,7 +74,7 @@ static int cli_default_perm = 1;
* it is already running. */ * it is already running. */
AST_MUTEX_DEFINE_STATIC(permsconfiglock); AST_MUTEX_DEFINE_STATIC(permsconfiglock);
/*! \brief List of users and permissions. */ /*! \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 * \brief map a debug or verbose value to a filename

View File

@ -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_show, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_showkey, "Shows database contents"), AST_CLI_DEFINE(handle_cli_database_showkey, "Shows database contents"),
AST_CLI_DEFINE(handle_cli_database_get, "Gets database value"), AST_CLI_DEFINE(handle_cli_database_get, "Gets database value"),

View File

@ -190,7 +190,7 @@ struct devstate_change {
char device[1]; char device[1];
}; };
struct { static struct {
pthread_t thread; pthread_t thread;
struct ast_event_sub *event_sub; struct ast_event_sub *event_sub;
ast_cond_t cond; ast_cond_t cond;

View File

@ -39,7 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/taskprocessor.h" #include "asterisk/taskprocessor.h"
#include "asterisk/astobj2.h" #include "asterisk/astobj2.h"
struct ast_taskprocessor *event_dispatcher; static struct ast_taskprocessor *event_dispatcher;
/*! /*!
* \brief An event information element * \brief An event information element

View File

@ -339,17 +339,17 @@ static void *dial_features_duplicate(void *data)
memcpy(df_copy, df, sizeof(*df)); memcpy(df_copy, df, sizeof(*df));
return df_copy; return df_copy;
} }
static void dial_features_destroy(void *data) static void dial_features_destroy(void *data)
{ {
struct ast_dial_features *df = data; struct ast_dial_features *df = data;
if (df) { if (df) {
ast_free(df); ast_free(df);
} }
} }
const struct ast_datastore_info dial_features_info = { static const struct ast_datastore_info dial_features_info = {
.type = "dial-features", .type = "dial-features",
.destroy = dial_features_destroy, .destroy = dial_features_destroy,
.duplicate = dial_features_duplicate, .duplicate = dial_features_duplicate,

View File

@ -1365,7 +1365,7 @@ static char *handle_cli_core_show_file_formats(struct ast_cli_entry *e, int cmd,
#undef FORMAT2 #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") AST_CLI_DEFINE(handle_cli_core_show_file_formats, "Displays file formats")
}; };

View File

@ -116,7 +116,7 @@ struct http_uri_redirect {
static AST_RWLIST_HEAD_STATIC(uri_redirects, 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; enum ast_http_method method;
const char text[]; const char text[];
} ast_http_methods_text[] = { } ast_http_methods_text[] = {

View File

@ -197,7 +197,7 @@ static char *handle_core_show_image_formats(struct ast_cli_entry *e, int cmd, st
return CLI_SUCCESS; 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") AST_CLI_DEFINE(handle_core_show_image_formats, "Displays image formats")
}; };

View File

@ -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 need to know what filename the module was loaded from while it
is being registered 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? */ /* XXX: should we check for duplicate resource names here? */

View File

@ -97,7 +97,7 @@ static char exec_after_rotate[256] = "";
static int filesize_reload_needed; static int filesize_reload_needed;
static unsigned int global_logmask = 0xFFFF; static unsigned int global_logmask = 0xFFFF;
enum rotatestrategy { static enum rotatestrategy {
SEQUENTIAL = 1 << 0, /* Original method - create a new file, in order */ 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 */ 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 */ TIMESTAMP = 1 << 2, /* Append the epoch timestamp onto the end of the archived file */

View File

@ -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); 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", .description = "Raw HTTP Manager Event Interface",
.uri = "rawman", .uri = "rawman",
.callback = rawman_http_callback, .callback = rawman_http_callback,
@ -5014,7 +5014,7 @@ struct ast_http_uri rawmanuri = {
.key = __FILE__, .key = __FILE__,
}; };
struct ast_http_uri manageruri = { static struct ast_http_uri manageruri = {
.description = "HTML Manager Event Interface", .description = "HTML Manager Event Interface",
.uri = "manager", .uri = "manager",
.callback = manager_http_callback, .callback = manager_http_callback,
@ -5022,7 +5022,7 @@ struct ast_http_uri manageruri = {
.key = __FILE__, .key = __FILE__,
}; };
struct ast_http_uri managerxmluri = { static struct ast_http_uri managerxmluri = {
.description = "XML Manager Event Interface", .description = "XML Manager Event Interface",
.uri = "mxml", .uri = "mxml",
.callback = mxml_http_callback, .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); 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", .description = "Raw HTTP Manager Event Interface w/Digest authentication",
.uri = "arawman", .uri = "arawman",
.has_subtree = 0, .has_subtree = 0,
@ -5056,7 +5056,7 @@ struct ast_http_uri arawmanuri = {
.key = __FILE__, .key = __FILE__,
}; };
struct ast_http_uri amanageruri = { static struct ast_http_uri amanageruri = {
.description = "HTML Manager Event Interface w/Digest authentication", .description = "HTML Manager Event Interface w/Digest authentication",
.uri = "amanager", .uri = "amanager",
.has_subtree = 0, .has_subtree = 0,
@ -5065,7 +5065,7 @@ struct ast_http_uri amanageruri = {
.key = __FILE__, .key = __FILE__,
}; };
struct ast_http_uri amanagerxmluri = { static struct ast_http_uri amanagerxmluri = {
.description = "XML Manager Event Interface w/Digest authentication", .description = "XML Manager Event Interface w/Digest authentication",
.uri = "amxml", .uri = "amxml",
.has_subtree = 0, .has_subtree = 0,
@ -5086,7 +5086,7 @@ static void purge_old_stuff(void *data)
purge_events(); 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 = { static struct ast_tcptls_session_args ami_desc = {
.accept_fd = -1, .accept_fd = -1,
.master = AST_PTHREADT_NULL, .master = AST_PTHREADT_NULL,

View File

@ -1050,7 +1050,7 @@ enum syntaxtype {
}; };
/*! \brief Mapping between type of node and type of syntax to generate. */ /*! \brief Mapping between type of node and type of syntax to generate. */
struct strsyntaxtype { static struct strsyntaxtype {
const char *type; const char *type;
enum syntaxtype stxtype; enum syntaxtype stxtype;
} stxtype[] = { } stxtype[] = {

View File

@ -3876,7 +3876,7 @@ AST_APP_OPTIONS(dundi_query_opts, BEGIN_OPTIONS
AST_APP_OPTION('b', OPT_BYPASS_CACHE), AST_APP_OPTION('b', OPT_BYPASS_CACHE),
END_OPTIONS ); END_OPTIONS );
unsigned int dundi_result_id; static unsigned int dundi_result_id;
struct dundi_result_datastore { struct dundi_result_datastore {
struct dundi_result results[MAX_RESULTS]; struct dundi_result results[MAX_RESULTS];

View File

@ -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); 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); AST_MUTEX_DEFINE_STATIC(config_file_lock);
char *config_file_data = NULL; static char *config_file_data = NULL;
long config_file_size = 0; static long config_file_size = 0;
static struct ast_context *local_contexts = NULL; static struct ast_context *local_contexts = NULL;
static struct ast_hashtab *local_table = NULL; static struct ast_hashtab *local_table = NULL;

View File

@ -54,9 +54,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define EXT_DATA_SIZE 256 #define EXT_DATA_SIZE 256
enum { enum option_flags {
OPTION_PATTERNS_DISABLED = (1 << 0), OPTION_PATTERNS_DISABLED = (1 << 0),
} option_flags; };
AST_APP_OPTIONS(switch_opts, { AST_APP_OPTIONS(switch_opts, {
AST_APP_OPTION('p', OPTION_PATTERNS_DISABLED), AST_APP_OPTION('p', OPTION_PATTERNS_DISABLED),

View File

@ -187,10 +187,10 @@ struct evententry {
AST_LIST_ENTRY(evententry) list; 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 */ 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) 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 *cat = NULL;
const char *val; 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); ast_log(LOG_WARNING, "Calendar support disabled, not loading %s calendar module\n", tech->type);
return -1; return -1;
} }
while ((cat = ast_category_browse(calendar_config, cat))) { while ((cat = ast_category_browse(ast_calendar_config, cat))) {
if (!strcasecmp(cat, "general")) { if (!strcasecmp(cat, "general")) {
continue; 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; continue;
} }
/* A serious error occurred loading calendars from this tech and it should be disabled */ /* 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); ast_calendar_unregister(tech);
return -1; return -1;
} }
@ -862,11 +862,11 @@ static int load_config(void *data)
return 0; return 0;
} }
if (calendar_config) { if (ast_calendar_config) {
ast_config_destroy(calendar_config); ast_config_destroy(ast_calendar_config);
} }
calendar_config = tmpcfg; ast_calendar_config = tmpcfg;
return 0; return 0;
} }

View File

@ -540,7 +540,7 @@ static void *caldav_load_calendar(void *void_data)
struct ast_calendar *cal = void_data; struct ast_calendar *cal = void_data;
ast_mutex_t refreshlock; 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"); ast_log(LOG_ERROR, "You must enable calendar support for res_caldav to load\n");
return NULL; return NULL;
} }
@ -575,7 +575,7 @@ static void *caldav_load_calendar(void *void_data)
return NULL; 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")) { if (!strcasecmp(v->name, "url")) {
ast_string_field_set(pvt, url, v->value); ast_string_field_set(pvt, url, v->value);
} else if (!strcasecmp(v->name, "user")) { } else if (!strcasecmp(v->name, "user")) {

View File

@ -623,7 +623,7 @@ static void *exchangecal_load_calendar(void *void_data)
struct ast_calendar *cal = void_data; struct ast_calendar *cal = void_data;
ast_mutex_t refreshlock; 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"); ast_log(LOG_ERROR, "You must enable calendar support for res_exchangecal to load\n");
return NULL; return NULL;
} }
@ -658,7 +658,7 @@ static void *exchangecal_load_calendar(void *void_data)
return NULL; 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")) { if (!strcasecmp(v->name, "url")) {
ast_string_field_set(pvt, url, v->value); ast_string_field_set(pvt, url, v->value);
} else if (!strcasecmp(v->name, "user")) { } else if (!strcasecmp(v->name, "user")) {

View File

@ -328,7 +328,7 @@ static void *ical_load_calendar(void *void_data)
struct ast_calendar *cal = void_data; struct ast_calendar *cal = void_data;
ast_mutex_t refreshlock; 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"); ast_log(LOG_ERROR, "You must enable calendar support for res_icalendar to load\n");
return NULL; return NULL;
} }
@ -362,7 +362,7 @@ static void *ical_load_calendar(void *void_data)
return NULL; 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")) { if (!strcasecmp(v->name, "url")) {
ast_string_field_set(pvt, url, v->value); ast_string_field_set(pvt, url, v->value);
} else if (!strcasecmp(v->name, "user")) { } else if (!strcasecmp(v->name, "user")) {

View File

@ -49,7 +49,7 @@ AST_THREADSTORAGE(escapebuf_buf);
#define RES_CONFIG_PGSQL_CONF "res_pgsql.conf" #define RES_CONFIG_PGSQL_CONF "res_pgsql.conf"
PGconn *pgsqlConn = NULL; static PGconn *pgsqlConn = NULL;
#define MAX_DB_OPTION_SIZE 64 #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_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); 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[] = { static struct ast_cli_entry cli_realtime[] = {
AST_CLI_DEFINE(handle_cli_realtime_pgsql_status, "Shows connection information for the PostgreSQL RealTime driver"), AST_CLI_DEFINE(handle_cli_realtime_pgsql_status, "Shows connection information for the PostgreSQL RealTime driver"),

View File

@ -261,8 +261,8 @@ static char *app_ajisend = "JabberSend";
static char *app_ajistatus = "JabberStatus"; static char *app_ajistatus = "JabberStatus";
struct aji_client_container clients; static struct aji_client_container clients;
struct aji_capabilities *capabilities = NULL; static struct aji_capabilities *capabilities = NULL;
/*! \brief Global flags, initialized to default values */ /*! \brief Global flags, initialized to default values */
static struct ast_flags globalflags = { AJI_AUTOREGISTER }; static struct ast_flags globalflags = { AJI_AUTOREGISTER };

View File

@ -180,7 +180,7 @@ struct ast_smdi_interface {
}; };
/*! \brief SMDI interface container. */ /*! \brief SMDI interface container. */
struct ast_smdi_interface_container { static struct ast_smdi_interface_container {
ASTOBJ_CONTAINER_COMPONENTS(struct ast_smdi_interface); ASTOBJ_CONTAINER_COMPONENTS(struct ast_smdi_interface);
} smdi_ifaces; } smdi_ifaces;

View File

@ -34,7 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
int res_snmp_agentx_subagent; int res_snmp_agentx_subagent;
int res_snmp_dont_stop; int res_snmp_dont_stop;
int res_snmp_enabled; static int res_snmp_enabled;
static pthread_t thread = AST_PTHREADT_NULL; static pthread_t thread = AST_PTHREADT_NULL;