diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2009-06-15 17:06:34 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2009-06-15 17:06:34 +0000 |
commit | 43792496747f84ee565c35ef6e0262192e0663cb (patch) | |
tree | fbacfc29514ed10d75a39d84509b69cc9a3388fc | |
parent | 78ee46f13f6900b3deee64c97c17649c16b1dce0 (diff) |
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'.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_agent.c | 2 | ||||
-rw-r--r-- | channels/chan_dahdi.c | 2 | ||||
-rw-r--r-- | channels/chan_h323.c | 2 | ||||
-rw-r--r-- | channels/chan_iax2.c | 4 | ||||
-rw-r--r-- | channels/chan_misdn.c | 10 | ||||
-rw-r--r-- | channels/chan_sip.c | 6 | ||||
-rw-r--r-- | channels/chan_skinny.c | 16 |
7 files changed, 20 insertions, 22 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 826c67391..f8205d4cd 100644 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -2283,7 +2283,7 @@ static int function_agent(struct ast_channel *chan, const char *cmd, char *data, return 0; } -struct ast_custom_function agent_function = { +static struct ast_custom_function agent_function = { .name = "AGENT", .read = function_agent, }; diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 9dd2b2af9..ee62405a2 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -2440,7 +2440,7 @@ static struct analog_callback dahdi_analog_callbacks = .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) diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 21ea13934..fd329538a 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -147,7 +147,7 @@ static unsigned int unique = 0; 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 */ diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 4640faab2..c90bc5fd0 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -305,7 +305,7 @@ static struct ast_netsock_list *netsock; 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 @@ static int function_iaxpeer(struct ast_channel *chan, const char *cmd, char *dat return 0; } -struct ast_custom_function iaxpeer_function = { +static struct ast_custom_function iaxpeer_function = { .name = "IAXPEER", .read = function_iaxpeer, }; diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index b9e38c598..db1eb557a 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -94,7 +94,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #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 @@ static const char misdn_cc_record_not_found[] = "Call completion record not foun #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 max_ports; 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); diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 17c446c9e..100c52c1c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1869,7 +1869,7 @@ struct sip_pvt { * 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 int hash_user_size = 563; 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 { diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 0aea73b07..7271a2ee0 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -642,7 +642,7 @@ struct soft_key_template_definition { #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 @@ struct skinny_req { /* 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 struct sockaddr_in bindaddr; 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 @@ struct skinny_line { int newmsgs; }; -struct skinny_line_options{ +static struct skinny_line_options{ SKINNY_LINE_OPTIONS } default_line_struct = { .callwaiting = 1, @@ -1274,7 +1274,7 @@ struct skinny_line_options{ .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 @@ struct skinny_device { 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 @@ struct skinny_device_options{ .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); |