[asterisk-commits] kpfleming: trunk r200620 - in /trunk: cdr/ formats/ funcs/ include/asterisk/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 15 12:35:09 CDT 2009


Author: kpfleming
Date: Mon Jun 15 12:34:30 2009
New Revision: 200620

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=200620
Log:
More 'static' qualifiers on module global variables.

The 'pglobal' tool is quite handy indeed :-)


Modified:
    trunk/cdr/cdr_manager.c
    trunk/formats/format_wav_gsm.c
    trunk/funcs/func_cdr.c
    trunk/funcs/func_channel.c
    trunk/funcs/func_curl.c
    trunk/funcs/func_cut.c
    trunk/funcs/func_enum.c
    trunk/funcs/func_lock.c
    trunk/funcs/func_odbc.c
    trunk/funcs/func_realtime.c
    trunk/funcs/func_vmcount.c
    trunk/include/asterisk/calendar.h
    trunk/main/cli.c
    trunk/main/db.c
    trunk/main/devicestate.c
    trunk/main/event.c
    trunk/main/features.c
    trunk/main/file.c
    trunk/main/http.c
    trunk/main/image.c
    trunk/main/loader.c
    trunk/main/logger.c
    trunk/main/manager.c
    trunk/main/xmldoc.c
    trunk/pbx/pbx_dundi.c
    trunk/pbx/pbx_lua.c
    trunk/pbx/pbx_realtime.c
    trunk/res/res_calendar.c
    trunk/res/res_calendar_caldav.c
    trunk/res/res_calendar_exchange.c
    trunk/res/res_calendar_icalendar.c
    trunk/res/res_config_pgsql.c
    trunk/res/res_jabber.c
    trunk/res/res_smdi.c
    trunk/res/res_snmp.c

Modified: trunk/cdr/cdr_manager.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/cdr/cdr_manager.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/cdr/cdr_manager.c (original)
+++ trunk/cdr/cdr_manager.c Mon Jun 15 12:34:30 2009
@@ -46,7 +46,7 @@
 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);
 

Modified: trunk/formats/format_wav_gsm.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/formats/format_wav_gsm.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/formats/format_wav_gsm.c (original)
+++ trunk/formats/format_wav_gsm.c Mon Jun 15 12:34:30 2009
@@ -48,7 +48,7 @@
 #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

Modified: trunk/funcs/func_cdr.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_cdr.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_cdr.c (original)
+++ trunk/funcs/func_cdr.c Mon Jun 15 12:34:30 2009
@@ -163,12 +163,12 @@
 	</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),

Modified: trunk/funcs/func_channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_channel.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_channel.c (original)
+++ trunk/funcs/func_channel.c Mon Jun 15 12:34:30 2009
@@ -227,7 +227,7 @@
 		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",

Modified: trunk/funcs/func_curl.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_curl.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_curl.c (original)
+++ trunk/funcs/func_curl.c Mon Jun 15 12:34:30 2009
@@ -569,7 +569,7 @@
 	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 @@
 	.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>)",

Modified: trunk/funcs/func_cut.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_cut.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_cut.c (original)
+++ trunk/funcs/func_cut.c Mon Jun 15 12:34:30 2009
@@ -305,12 +305,12 @@
 	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,

Modified: trunk/funcs/func_enum.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_enum.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_enum.c (original)
+++ trunk/funcs/func_enum.c Mon Jun 15 12:34:30 2009
@@ -216,7 +216,7 @@
 	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 @@
 	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,
 }; 

Modified: trunk/funcs/func_lock.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_lock.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_lock.c (original)
+++ trunk/funcs/func_lock.c Mon Jun 15 12:34:30 2009
@@ -84,7 +84,7 @@
 
 
 
-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;

Modified: trunk/funcs/func_odbc.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_odbc.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Mon Jun 15 12:34:30 2009
@@ -99,10 +99,10 @@
 
 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 @@
 
 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 @@
 	char names[0];
 };
 
-AST_RWLIST_HEAD_STATIC(queries, acf_odbc_query);
+static AST_RWLIST_HEAD_STATIC(queries, acf_odbc_query);
 
 static int resultcount = 0;
 

Modified: trunk/funcs/func_realtime.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_realtime.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_realtime.c (original)
+++ trunk/funcs/func_realtime.c Mon Jun 15 12:34:30 2009
@@ -410,29 +410,29 @@
 	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,
 };

Modified: trunk/funcs/func_vmcount.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/funcs/func_vmcount.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/funcs/func_vmcount.c (original)
+++ trunk/funcs/func_vmcount.c Mon Jun 15 12:34:30 2009
@@ -94,7 +94,7 @@
 	return 0;
 }
 
-struct ast_custom_function acf_vmcount = {
+static struct ast_custom_function acf_vmcount = {
 	.name = "VMCOUNT",
 	.read = acf_vmcount_exec,
 	.read_max = 12,

Modified: trunk/include/asterisk/calendar.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/calendar.h?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/include/asterisk/calendar.h (original)
+++ trunk/include/asterisk/calendar.h Mon Jun 15 12:34:30 2009
@@ -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;

Modified: trunk/main/cli.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/cli.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Mon Jun 15 12:34:30 2009
@@ -74,7 +74,7 @@
  * 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

Modified: trunk/main/db.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/db.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Mon Jun 15 12:34:30 2009
@@ -594,7 +594,7 @@
 	}
 }
 
-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"),

Modified: trunk/main/devicestate.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/devicestate.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/devicestate.c (original)
+++ trunk/main/devicestate.c Mon Jun 15 12:34:30 2009
@@ -190,7 +190,7 @@
 	char device[1];
 };
 
-struct {
+static struct {
 	pthread_t thread;
 	struct ast_event_sub *event_sub;
 	ast_cond_t cond;

Modified: trunk/main/event.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/event.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/event.c (original)
+++ trunk/main/event.c Mon Jun 15 12:34:30 2009
@@ -39,7 +39,7 @@
 #include "asterisk/taskprocessor.h"
 #include "asterisk/astobj2.h"
 
-struct ast_taskprocessor *event_dispatcher;
+static struct ast_taskprocessor *event_dispatcher;
 
 /*!
  * \brief An event information element

Modified: trunk/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/features.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Mon Jun 15 12:34:30 2009
@@ -339,17 +339,17 @@
  	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,

Modified: trunk/main/file.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/file.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/file.c (original)
+++ trunk/main/file.c Mon Jun 15 12:34:30 2009
@@ -1365,7 +1365,7 @@
 #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")
 };
 

Modified: trunk/main/http.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/http.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Mon Jun 15 12:34:30 2009
@@ -116,7 +116,7 @@
 
 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[] = {

Modified: trunk/main/image.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/image.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/image.c (original)
+++ trunk/main/image.c Mon Jun 15 12:34:30 2009
@@ -197,7 +197,7 @@
 	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")
 };
 

Modified: trunk/main/loader.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/loader.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Mon Jun 15 12:34:30 2009
@@ -125,7 +125,7 @@
    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? */
 

Modified: trunk/main/logger.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/logger.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Mon Jun 15 12:34:30 2009
@@ -97,7 +97,7 @@
 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 */

Modified: trunk/main/manager.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/manager.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon Jun 15 12:34:30 2009
@@ -5006,7 +5006,7 @@
 	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 @@
 	.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 @@
 	.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 @@
 	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 @@
 	.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 @@
 	.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 @@
 	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,

Modified: trunk/main/xmldoc.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/xmldoc.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/main/xmldoc.c (original)
+++ trunk/main/xmldoc.c Mon Jun 15 12:34:30 2009
@@ -1050,7 +1050,7 @@
 };
 
 /*! \brief Mapping between type of node and type of syntax to generate. */
-struct strsyntaxtype {
+static struct strsyntaxtype {
 	const char *type;
 	enum syntaxtype stxtype;
 } stxtype[] = {

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Mon Jun 15 12:34:30 2009
@@ -3876,7 +3876,7 @@
 	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];

Modified: trunk/pbx/pbx_lua.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/pbx/pbx_lua.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/pbx/pbx_lua.c (original)
+++ trunk/pbx/pbx_lua.c Mon Jun 15 12:34:30 2009
@@ -93,8 +93,8 @@
 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;

Modified: trunk/pbx/pbx_realtime.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/pbx/pbx_realtime.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/pbx/pbx_realtime.c (original)
+++ trunk/pbx/pbx_realtime.c Mon Jun 15 12:34:30 2009
@@ -54,9 +54,9 @@
 
 #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),

Modified: trunk/res/res_calendar.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_calendar.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_calendar.c (original)
+++ trunk/res/res_calendar.c Mon Jun 15 12:34:30 2009
@@ -187,10 +187,10 @@
 	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 @@
 	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 @@
 		return 0;
 	}
 
-	if (calendar_config) {
-		ast_config_destroy(calendar_config);
-	}
-
-	calendar_config = tmpcfg;
+	if (ast_calendar_config) {
+		ast_config_destroy(ast_calendar_config);
+	}
+
+	ast_calendar_config = tmpcfg;
 
 	return 0;
 }

Modified: trunk/res/res_calendar_caldav.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_calendar_caldav.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_calendar_caldav.c (original)
+++ trunk/res/res_calendar_caldav.c Mon Jun 15 12:34:30 2009
@@ -540,7 +540,7 @@
 	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 @@
 		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")) {

Modified: trunk/res/res_calendar_exchange.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_calendar_exchange.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_calendar_exchange.c (original)
+++ trunk/res/res_calendar_exchange.c Mon Jun 15 12:34:30 2009
@@ -623,7 +623,7 @@
 	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 @@
 		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")) {

Modified: trunk/res/res_calendar_icalendar.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_calendar_icalendar.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_calendar_icalendar.c (original)
+++ trunk/res/res_calendar_icalendar.c Mon Jun 15 12:34:30 2009
@@ -328,7 +328,7 @@
 	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 @@
 		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")) {

Modified: trunk/res/res_config_pgsql.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_config_pgsql.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_config_pgsql.c (original)
+++ trunk/res/res_config_pgsql.c Mon Jun 15 12:34:30 2009
@@ -49,7 +49,7 @@
 
 #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 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"),

Modified: trunk/res/res_jabber.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_jabber.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Mon Jun 15 12:34:30 2009
@@ -261,8 +261,8 @@
 
 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 };

Modified: trunk/res/res_smdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_smdi.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_smdi.c (original)
+++ trunk/res/res_smdi.c Mon Jun 15 12:34:30 2009
@@ -180,7 +180,7 @@
 };
 
 /*! \brief SMDI interface container. */
-struct ast_smdi_interface_container {
+static struct ast_smdi_interface_container {
 	ASTOBJ_CONTAINER_COMPONENTS(struct ast_smdi_interface);
 } smdi_ifaces;
 

Modified: trunk/res/res_snmp.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_snmp.c?view=diff&rev=200620&r1=200619&r2=200620
==============================================================================
--- trunk/res/res_snmp.c (original)
+++ trunk/res/res_snmp.c Mon Jun 15 12:34:30 2009
@@ -34,7 +34,7 @@
 
 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;
 




More information about the asterisk-commits mailing list