diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-27 21:34:27 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-27 21:34:27 +0000 |
commit | 246797b309ef964e7bd9ac2082d0ef42944c0e9d (patch) | |
tree | 4f1a556ee7a811109d8fb9674e218052955e0083 /channels | |
parent | dccdbdeeb39de2990741e60c9d85013c807f3e93 (diff) |
More contributed BSD enhancements
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@919 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/alaw.h | 4 | ||||
-rwxr-xr-x | channels/chan_iax.c | 12 | ||||
-rwxr-xr-x | channels/chan_iax2.c | 10 | ||||
-rwxr-xr-x | channels/chan_mgcp.c | 6 | ||||
-rwxr-xr-x | channels/chan_modem.c | 2 | ||||
-rwxr-xr-x | channels/chan_modem_aopen.c | 4 | ||||
-rwxr-xr-x | channels/chan_modem_bestdata.c | 4 | ||||
-rwxr-xr-x | channels/chan_modem_i4l.c | 4 | ||||
-rwxr-xr-x | channels/chan_oss.c | 4 | ||||
-rwxr-xr-x | channels/chan_sip.c | 12 |
10 files changed, 31 insertions, 31 deletions
diff --git a/channels/alaw.h b/channels/alaw.h index 3148a9d67..1423e495c 100755 --- a/channels/alaw.h +++ b/channels/alaw.h @@ -23,7 +23,7 @@ // table to convert unsigned a-law bytes to signed linear integers -const int alaw2int[256] = { +static const int alaw2int[256] = { -5504,5504,-344,344,-22016,22016,-1376,1376,-2752,2752,-88,88,-11008,11008, -688,688,-7552,7552,-472,472,-30208,30208,-1888,1888,-3776,3776,-216,216, -15104,15104,-944,944,-4480,4480,-280,280,-17920,17920,-1120,1120,-2240,2240, @@ -50,7 +50,7 @@ const int alaw2int[256] = { // shift the integer to be 12+1 bit first, then add 4096 to get // the right index -const unsigned char int2alaw[8192] = { +static const unsigned char int2alaw[8192] = { 84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84, 84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84, 84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84, diff --git a/channels/chan_iax.c b/channels/chan_iax.c index fda869879..fe580353d 100755 --- a/channels/chan_iax.c +++ b/channels/chan_iax.c @@ -93,7 +93,7 @@ static int expirey = AST_DEFAULT_REG_EXPIRE; static int usecnt; static pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; -int (*regfunk)(char *username, int onoff) = NULL; +int (*iax_regfunk)(char *username, int onoff) = NULL; /* Ethernet, etc */ #define IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF @@ -218,7 +218,7 @@ struct iax_registry { struct iax_registry *next; }; -struct iax_registry *registrations; +static struct iax_registry *registrations; /* Don't retry more frequently than every 10 ms, or less frequently than every 5 seconds */ #define MIN_RETRY_TIME 10 @@ -426,10 +426,10 @@ static struct iax_dpcache { struct iax_dpcache *peer; /* For linking in peers */ } *dpcache; -pthread_mutex_t dpcache_lock; +static pthread_mutex_t dpcache_lock; #ifdef DEBUG_SUPPORT -void showframe(struct ast_iax_frame *f, struct ast_iax_full_hdr *fhi, int rx, struct sockaddr_in *sin) +static void showframe(struct ast_iax_frame *f, struct ast_iax_full_hdr *fhi, int rx, struct sockaddr_in *sin) { char *frames[] = { "(0?)", @@ -4501,7 +4501,7 @@ static struct iax_user *build_user(char *name, struct ast_variable *v) } -void delete_users(void){ +static void delete_users(void){ struct iax_user *user, *userlast; struct iax_peer *peer; struct iax_registry *reg, *regl; @@ -4535,7 +4535,7 @@ void delete_users(void){ ast_pthread_mutex_unlock(&peerl.lock); } -void prune_peers(void){ +static void prune_peers(void){ /* Prune peers who still are supposed to be deleted */ struct iax_peer *peer, *peerlast, *peernext; int x; diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 2a547926f..2446c9ab6 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -109,7 +109,7 @@ static int timingfd = -1; /* Timing file descriptor */ static int usecnt; static pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; -int (*regfunk)(char *username, int onoff) = NULL; +int (*iax2_regfunk)(char *username, int onoff) = NULL; /* Ethernet, etc */ #define IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF @@ -244,7 +244,7 @@ struct iax2_registry { struct iax2_registry *next; }; -struct iax2_registry *registrations; +static struct iax2_registry *registrations; /* Don't retry more frequently than every 10 ms, or less frequently than every 5 seconds */ #define MIN_RETRY_TIME 10 @@ -429,7 +429,7 @@ static struct iax2_dpcache { struct iax2_dpcache *peer; /* For linking in peers */ } *dpcache; -pthread_mutex_t dpcache_lock; +static pthread_mutex_t dpcache_lock; static void iax_debug_output(const char *data) { @@ -4808,7 +4808,7 @@ static struct iax2_user *build_user(char *name, struct ast_variable *v) } -void delete_users(void){ +static void delete_users(void){ struct iax2_user *user, *userlast; struct iax2_peer *peer; struct iax2_registry *reg, *regl; @@ -4842,7 +4842,7 @@ void delete_users(void){ ast_pthread_mutex_unlock(&peerl.lock); } -void prune_peers(void){ +static void prune_peers(void){ /* Prune peers who still are supposed to be deleted */ struct iax2_peer *peer, *peerlast, *peernext; int x; diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 0975072b5..43afb5240 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -155,7 +155,7 @@ struct mgcp_endpoint { struct mgcp_gateway *parent; }; -struct mgcp_gateway { +static struct mgcp_gateway { /* A gateway containing one or more endpoints */ char name[80]; struct sockaddr_in addr; @@ -293,7 +293,7 @@ struct my_ifreq { } ifr_ifru; }; -struct in_addr *lookup_iface(char *iface) { +static struct in_addr *lookup_iface(char *iface) { int mysock; int res; static struct my_ifreq ifreq; @@ -1694,7 +1694,7 @@ static struct ast_channel *mgcp_request(char *type, int format, void *data) return tmpc; } -struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v) +static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v) { struct mgcp_gateway *gw; struct mgcp_endpoint *e; diff --git a/channels/chan_modem.c b/channels/chan_modem.c index 90ac7c3ae..900eb0ad5 100755 --- a/channels/chan_modem.c +++ b/channels/chan_modem.c @@ -808,7 +808,7 @@ static unsigned int get_group(char *s) char *piece; int start, finish,x; unsigned int group = 0; - char *copy = strdupa(s); + char *copy = ast_strdupa(s); char *stringp=NULL; if (!copy) { ast_log(LOG_ERROR, "Out of memory\n"); diff --git a/channels/chan_modem_aopen.c b/channels/chan_modem_aopen.c index a8f6adb06..3aa1978af 100755 --- a/channels/chan_modem_aopen.c +++ b/channels/chan_modem_aopen.c @@ -33,8 +33,8 @@ static char *breakcmd = "\0x10\0x03"; static char *desc = "A/Open (Rockwell Chipset) ITU-2 VoiceModem Driver"; -int usecnt; -pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; +static int usecnt; +static pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; static char *aopen_idents[] = { /* Identify A/Open Modem */ diff --git a/channels/chan_modem_bestdata.c b/channels/chan_modem_bestdata.c index 3faad53e8..90cc87828 100755 --- a/channels/chan_modem_bestdata.c +++ b/channels/chan_modem_bestdata.c @@ -38,8 +38,8 @@ static char *breakcmd = "\020!"; static char *desc = "BestData (Conexant V.90 Chipset) VoiceModem Driver"; -int usecnt; -pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; +static int usecnt; +static pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; static char *bestdata_idents[] = { /* Identify BestData Modem */ diff --git a/channels/chan_modem_i4l.c b/channels/chan_modem_i4l.c index 277c16b86..857188277 100755 --- a/channels/chan_modem_i4l.c +++ b/channels/chan_modem_i4l.c @@ -33,8 +33,8 @@ static char *breakcmd = "\0x10\0x14\0x10\0x3"; static char *desc = "ISDN4Linux Emulated Modem Driver"; -int usecnt; -pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; +static int usecnt; +static pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; static char *i4l_idents[] = { /* Identify ISDN4Linux Driver */ diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 7199d33b9..376f5e059 100755 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -75,7 +75,7 @@ static char context[AST_MAX_EXTENSION] = "default"; static char language[MAX_LANGUAGE] = ""; static char exten[AST_MAX_EXTENSION] = "s"; -int hookstate=0; +static int hookstate=0; static short silence[FRAME_SIZE] = {0, }; @@ -123,7 +123,7 @@ static int time_has_passed(void) with 160 sample frames, and a buffer size of 3, we have a 60ms buffer, usually plenty. */ -pthread_t sthread; +static pthread_t sthread; #define MAX_BUFFER_SIZE 100 static int buffersize = 3; diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 8458f3a81..2488bd543 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -343,7 +343,7 @@ struct sip_registry { #define REINVITE_UPDATE 2 static int sip_do_register(struct sip_registry *r); -struct sip_registry *registrations; +static struct sip_registry *registrations; static int sipsock = -1; static int globalnat = 0; @@ -361,7 +361,7 @@ static int transmit_reinvite_with_sdp(struct sip_pvt *p, struct ast_rtp *rtp); static int transmit_info_with_digit(struct sip_pvt *p, char digit); static int transmit_message_with_text(struct sip_pvt *p, char *text); static int do_proxy_auth(struct sip_pvt *p, struct sip_request *req); -char *getsipuri(char *header); +static char *getsipuri(char *header); static void free_old_route(struct sip_route *route); static int build_reply_digest(struct sip_pvt *p, char *orig_header, char *digest, int digest_len); @@ -848,7 +848,7 @@ struct my_ifreq { struct sockaddr_in ifru_addr; }; -struct in_addr *lookup_iface(char *iface) { +static struct in_addr *lookup_iface(char *iface) { int mysock; int res; static struct my_ifreq ifreq; @@ -5350,7 +5350,7 @@ int load_module() return res; } -void delete_users(void) +static void delete_users(void) { struct sip_user *user, *userlast; struct sip_peer *peer; @@ -5384,7 +5384,7 @@ void delete_users(void) ast_pthread_mutex_unlock(&peerl.lock); } -void prune_peers(void) +static void prune_peers(void) { /* Prune peers who still are supposed to be deleted */ struct sip_peer *peer, *peerlast, *peernext; @@ -5502,7 +5502,7 @@ char *description() return desc; } -char *getsipuri(char *header) +static char *getsipuri(char *header) { char *c, *d, *retval; int n; |