dect
/
asterisk
Archived
13
0
Fork 0

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: http://svn.digium.com/svn/asterisk/trunk@200587 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
kpfleming 2009-06-15 17:06:34 +00:00
parent 4a6d090061
commit abe57aceec
7 changed files with 20 additions and 22 deletions

View File

@ -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,
};

View File

@ -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)

View File

@ -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 */

View File

@ -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,
};

View File

@ -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);

View File

@ -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 {

View File

@ -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);