[svn-commits] kpfleming: trunk r200587 - /trunk/channels/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 15 12:06:40 CDT 2009


Author: kpfleming
Date: Mon Jun 15 12:06:34 2009
New Revision: 200587

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=200587
Log:
Convert a number of global module variables to 'static'.

These modules all contained variables that are module-global but not system-global,
but were not marked 'static'.


Modified:
    trunk/channels/chan_agent.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_h323.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_misdn.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c

Modified: trunk/channels/chan_agent.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=200587&r1=200586&r2=200587
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Mon Jun 15 12:06:34 2009
@@ -2283,7 +2283,7 @@
 	return 0;
 }
 
-struct ast_custom_function agent_function = {
+static struct ast_custom_function agent_function = {
 	.name = "AGENT",
 	.read = function_agent,
 };

Modified: trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=200587&r1=200586&r2=200587
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Mon Jun 15 12:06:34 2009
@@ -2440,7 +2440,7 @@
 	.decrease_ss_count = my_decrease_ss_count,
 };
 
-struct dahdi_pvt *round_robin[32];
+static struct dahdi_pvt *round_robin[32];
 
 #if defined(HAVE_PRI)
 static inline int pri_grab(struct dahdi_pvt *pvt, struct dahdi_pri *pri)

Modified: trunk/channels/chan_h323.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_h323.c?view=diff&rev=200587&r1=200586&r2=200587
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Mon Jun 15 12:06:34 2009
@@ -147,7 +147,7 @@
 static call_options_t global_options;
 
 /*! \brief Private structure of a OpenH323 channel */
-struct oh323_pvt {
+static struct oh323_pvt {
 	ast_mutex_t lock;			/*!< Channel private lock */
 	call_options_t options;			/*!<!< Options to be used during call setup */
 	int alreadygone;			/*!< Whether or not we've already been destroyed by our peer */

Modified: trunk/channels/chan_iax2.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=200587&r1=200586&r2=200587
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Mon Jun 15 12:06:34 2009
@@ -305,7 +305,7 @@
 static struct ast_netsock_list *outsock;		/*!< used if sourceaddress specified and bindaddr == INADDR_ANY */
 static int defaultsockfd = -1;
 
-int (*iax2_regfunk)(const char *username, int onoff) = NULL;
+static int (*iax2_regfunk)(const char *username, int onoff) = NULL;
 
 /* Ethernet, etc */
 #define IAX_CAPABILITY_FULLBANDWIDTH 	0xFFFF
@@ -12318,7 +12318,7 @@
 	return 0;
 }
 
-struct ast_custom_function iaxpeer_function = {
+static struct ast_custom_function iaxpeer_function = {
 	.name = "IAXPEER",
 	.read = function_iaxpeer,
 };

Modified: trunk/channels/chan_misdn.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=200587&r1=200586&r2=200587
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Mon Jun 15 12:06:34 2009
@@ -94,7 +94,7 @@
 #include "chan_misdn_config.h"
 #include "isdn_lib.h"
 
-char global_tracefile[BUFFERSIZE + 1];
+static char global_tracefile[BUFFERSIZE + 1];
 
 static int g_config_initialized = 0;
 
@@ -290,7 +290,7 @@
 #define MISDN_ERROR_MSG		"MISDN_ERROR_MSG"
 #endif	/* defined(AST_MISDN_ENHANCEMENTS) */
 
-ast_mutex_t release_lock;
+static ast_mutex_t release_lock;
 
 enum misdn_chan_state {
 	MISDN_NOTHING = 0,         /*!< at beginning */
@@ -683,13 +683,11 @@
 static int *misdn_in_calls;
 static int *misdn_out_calls;
 
-struct chan_list dummy_cl;
-
 /*!
  * \brief Global channel call record list head.
  */
-struct chan_list *cl_te=NULL;
-ast_mutex_t cl_te_lock;
+static struct chan_list *cl_te=NULL;
+static ast_mutex_t cl_te_lock;
 
 static enum event_response_e
 cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data);

Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=200587&r1=200586&r2=200587
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jun 15 12:06:34 2009
@@ -1869,7 +1869,7 @@
  * the container and individual items, and functions to add/remove
  * references to the individual items.
  */
-struct ao2_container *dialogs;
+static struct ao2_container *dialogs;
 
 #define sip_pvt_lock(x) ao2_lock(x)
 #define sip_pvt_trylock(x) ao2_trylock(x)
@@ -2148,8 +2148,8 @@
 static AST_LIST_HEAD_STATIC(threadl, sip_threadinfo);
 
 /*! \brief  The peer list: Users, Peers and Friends */
-struct ao2_container *peers;
-struct ao2_container *peers_by_ip;
+static struct ao2_container *peers;
+static struct ao2_container *peers_by_ip;
 
 /*! \brief  The register list: Other SIP proxies we register with and place calls to */
 static struct ast_register_list {

Modified: trunk/channels/chan_skinny.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=200587&r1=200586&r2=200587
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Jun 15 12:06:34 2009
@@ -642,7 +642,7 @@
 #define SOFTKEY_DND 0x13
 #define SOFTKEY_IDIVERT 0x14
 
-struct soft_key_template_definition soft_key_template_default[] = {
+static struct soft_key_template_definition soft_key_template_default[] = {
 	{ "\200\001", SOFTKEY_REDIAL },
 	{ "\200\002", SOFTKEY_NEWCALL },
 	{ "\200\003", SOFTKEY_HOLD },
@@ -1020,7 +1020,7 @@
 /* XXX This is the combined size of the variables above.  (len, res, e)
    If more are added, this MUST change.
    (sizeof(skinny_req) - sizeof(skinny_data)) DOES NOT WORK on all systems (amd64?). */
-int skinny_header_size = 12;
+static int skinny_header_size = 12;
 
 /*****************************
  * Asterisk specific globals *
@@ -1034,8 +1034,8 @@
 static char ourhost[256];
 static int ourport;
 static struct in_addr __ourip;
-struct ast_hostent ahp;
-struct hostent *hp;
+static struct ast_hostent ahp;
+static struct hostent *hp;
 static int skinnysock = -1;
 static pthread_t accept_t;
 static int callnums = 1;
@@ -1255,7 +1255,7 @@
 	int newmsgs;
 };
 
-struct skinny_line_options{
+static struct skinny_line_options{
 	SKINNY_LINE_OPTIONS
 } default_line_struct = {
  	.callwaiting = 1,
@@ -1274,7 +1274,7 @@
 	.prune = 0,
 	.hookstate = SKINNY_ONHOOK,
 };
-struct skinny_line_options *default_line = &default_line_struct;
+static struct skinny_line_options *default_line = &default_line_struct;
 
 static AST_LIST_HEAD_STATIC(lines, skinny_line);
 
@@ -1335,7 +1335,7 @@
 	AST_LIST_ENTRY(skinny_device) list;
 };
 
-struct skinny_device_options{
+static struct skinny_device_options {
 	SKINNY_DEVICE_OPTIONS
 } default_device_struct = {
 	.transfer = 1,
@@ -1347,7 +1347,7 @@
  	.capability = 0,
 	.prune = 0,
 };
-struct skinny_device_options *default_device = &default_device_struct;
+static struct skinny_device_options *default_device = &default_device_struct;
 	
 static AST_LIST_HEAD_STATIC(devices, skinny_device);
 




More information about the svn-commits mailing list