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
certified/1.8.6
Kevin P. Fleming 17 years ago
parent 78ee46f13f
commit 4379249674

@ -2283,7 +2283,7 @@ static int function_agent(struct ast_channel *chan, const char *cmd, char *data,
return 0; return 0;
} }
struct ast_custom_function agent_function = { static struct ast_custom_function agent_function = {
.name = "AGENT", .name = "AGENT",
.read = function_agent, .read = function_agent,
}; };

@ -2440,7 +2440,7 @@ static struct analog_callback dahdi_analog_callbacks =
.decrease_ss_count = my_decrease_ss_count, .decrease_ss_count = my_decrease_ss_count,
}; };
struct dahdi_pvt *round_robin[32]; static struct dahdi_pvt *round_robin[32];
#if defined(HAVE_PRI) #if defined(HAVE_PRI)
static inline int pri_grab(struct dahdi_pvt *pvt, struct dahdi_pri *pri) static inline int pri_grab(struct dahdi_pvt *pvt, struct dahdi_pri *pri)

@ -147,7 +147,7 @@ static unsigned int unique = 0;
static call_options_t global_options; static call_options_t global_options;
/*! \brief Private structure of a OpenH323 channel */ /*! \brief Private structure of a OpenH323 channel */
struct oh323_pvt { static struct oh323_pvt {
ast_mutex_t lock; /*!< Channel private lock */ ast_mutex_t lock; /*!< Channel private lock */
call_options_t options; /*!<!< Options to be used during call setup */ call_options_t options; /*!<!< Options to be used during call setup */
int alreadygone; /*!< Whether or not we've already been destroyed by our peer */ int alreadygone; /*!< Whether or not we've already been destroyed by our peer */

@ -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 struct ast_netsock_list *outsock; /*!< used if sourceaddress specified and bindaddr == INADDR_ANY */
static int defaultsockfd = -1; 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 */ /* Ethernet, etc */
#define IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF #define IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF
@ -12318,7 +12318,7 @@ static int function_iaxpeer(struct ast_channel *chan, const char *cmd, char *dat
return 0; return 0;
} }
struct ast_custom_function iaxpeer_function = { static struct ast_custom_function iaxpeer_function = {
.name = "IAXPEER", .name = "IAXPEER",
.read = function_iaxpeer, .read = function_iaxpeer,
}; };

@ -94,7 +94,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "chan_misdn_config.h" #include "chan_misdn_config.h"
#include "isdn_lib.h" #include "isdn_lib.h"
char global_tracefile[BUFFERSIZE + 1]; static char global_tracefile[BUFFERSIZE + 1];
static int g_config_initialized = 0; 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" #define MISDN_ERROR_MSG "MISDN_ERROR_MSG"
#endif /* defined(AST_MISDN_ENHANCEMENTS) */ #endif /* defined(AST_MISDN_ENHANCEMENTS) */
ast_mutex_t release_lock; static ast_mutex_t release_lock;
enum misdn_chan_state { enum misdn_chan_state {
MISDN_NOTHING = 0, /*!< at beginning */ MISDN_NOTHING = 0, /*!< at beginning */
@ -683,13 +683,11 @@ static int max_ports;
static int *misdn_in_calls; static int *misdn_in_calls;
static int *misdn_out_calls; static int *misdn_out_calls;
struct chan_list dummy_cl;
/*! /*!
* \brief Global channel call record list head. * \brief Global channel call record list head.
*/ */
struct chan_list *cl_te=NULL; static struct chan_list *cl_te=NULL;
ast_mutex_t cl_te_lock; static ast_mutex_t cl_te_lock;
static enum event_response_e static enum event_response_e
cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data); cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data);

@ -1869,7 +1869,7 @@ struct sip_pvt {
* the container and individual items, and functions to add/remove * the container and individual items, and functions to add/remove
* references to the individual items. * 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_lock(x) ao2_lock(x)
#define sip_pvt_trylock(x) ao2_trylock(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); static AST_LIST_HEAD_STATIC(threadl, sip_threadinfo);
/*! \brief The peer list: Users, Peers and Friends */ /*! \brief The peer list: Users, Peers and Friends */
struct ao2_container *peers; static struct ao2_container *peers;
struct ao2_container *peers_by_ip; static struct ao2_container *peers_by_ip;
/*! \brief The register list: Other SIP proxies we register with and place calls to */ /*! \brief The register list: Other SIP proxies we register with and place calls to */
static struct ast_register_list { static struct ast_register_list {

@ -642,7 +642,7 @@ struct soft_key_template_definition {
#define SOFTKEY_DND 0x13 #define SOFTKEY_DND 0x13
#define SOFTKEY_IDIVERT 0x14 #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\001", SOFTKEY_REDIAL },
{ "\200\002", SOFTKEY_NEWCALL }, { "\200\002", SOFTKEY_NEWCALL },
{ "\200\003", SOFTKEY_HOLD }, { "\200\003", SOFTKEY_HOLD },
@ -1020,7 +1020,7 @@ struct skinny_req {
/* XXX This is the combined size of the variables above. (len, res, e) /* XXX This is the combined size of the variables above. (len, res, e)
If more are added, this MUST change. If more are added, this MUST change.
(sizeof(skinny_req) - sizeof(skinny_data)) DOES NOT WORK on all systems (amd64?). */ (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 * * Asterisk specific globals *
@ -1034,8 +1034,8 @@ static struct sockaddr_in bindaddr;
static char ourhost[256]; static char ourhost[256];
static int ourport; static int ourport;
static struct in_addr __ourip; static struct in_addr __ourip;
struct ast_hostent ahp; static struct ast_hostent ahp;
struct hostent *hp; static struct hostent *hp;
static int skinnysock = -1; static int skinnysock = -1;
static pthread_t accept_t; static pthread_t accept_t;
static int callnums = 1; static int callnums = 1;
@ -1255,7 +1255,7 @@ struct skinny_line {
int newmsgs; int newmsgs;
}; };
struct skinny_line_options{ static struct skinny_line_options{
SKINNY_LINE_OPTIONS SKINNY_LINE_OPTIONS
} default_line_struct = { } default_line_struct = {
.callwaiting = 1, .callwaiting = 1,
@ -1274,7 +1274,7 @@ struct skinny_line_options{
.prune = 0, .prune = 0,
.hookstate = SKINNY_ONHOOK, .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); static AST_LIST_HEAD_STATIC(lines, skinny_line);
@ -1335,7 +1335,7 @@ struct skinny_device {
AST_LIST_ENTRY(skinny_device) list; AST_LIST_ENTRY(skinny_device) list;
}; };
struct skinny_device_options{ static struct skinny_device_options {
SKINNY_DEVICE_OPTIONS SKINNY_DEVICE_OPTIONS
} default_device_struct = { } default_device_struct = {
.transfer = 1, .transfer = 1,
@ -1347,7 +1347,7 @@ struct skinny_device_options{
.capability = 0, .capability = 0,
.prune = 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); static AST_LIST_HEAD_STATIC(devices, skinny_device);

Loading…
Cancel
Save