[asterisk-commits] branch group/autoconf_and_menuselect r22110 - /team/group/autoconf_and_menuse...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 21 14:37:15 MST 2006


Author: kpfleming
Date: Fri Apr 21 16:37:13 2006
New Revision: 22110

URL: http://svn.digium.com/view/asterisk?rev=22110&view=rev
Log:
fix some problems found by re-enabling warnings

Modified:
    team/group/autoconf_and_menuselect/channels/chan_agent.c
    team/group/autoconf_and_menuselect/channels/chan_alsa.c
    team/group/autoconf_and_menuselect/channels/chan_misdn.c
    team/group/autoconf_and_menuselect/channels/chan_sip.c
    team/group/autoconf_and_menuselect/channels/chan_zap.c

Modified: team/group/autoconf_and_menuselect/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_agent.c?rev=22110&r1=22109&r2=22110&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_agent.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_agent.c Fri Apr 21 16:37:13 2006
@@ -2390,7 +2390,7 @@
 	return res;
 }
 
-struct agent_pvt *find_agent(char *agentid)
+static struct agent_pvt *find_agent(char *agentid)
 {
 	struct agent_pvt *cur;
 

Modified: team/group/autoconf_and_menuselect/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_alsa.c?rev=22110&r1=22109&r2=22110&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_alsa.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_alsa.c Fri Apr 21 16:37:13 2006
@@ -1045,7 +1045,7 @@
 	{ { "autoanswer", NULL }, console_autoanswer, "Sets/displays autoanswer", autoanswer_usage, autoanswer_complete }
 };
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	int res;
 	int x;
@@ -1104,9 +1104,7 @@
 	return 0;
 }
 
-
-
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int x;
 	
@@ -1128,18 +1126,14 @@
 	return 0;
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return (char *) desc;
 }
 
-int usecount(void)
-{
-	return usecnt;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
 
+STD_MOD(MOD_0, NULL, NULL, NULL);

Modified: team/group/autoconf_and_menuselect/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_misdn.c?rev=22110&r1=22109&r2=22110&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_misdn.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_misdn.c Fri Apr 21 16:37:13 2006
@@ -257,15 +257,11 @@
 
 static int tracing = 0 ;
 
-static int usecnt=0;
-
 static char **misdn_key_vector=NULL;
 static int misdn_key_vector_size=0;
 
 /* Only alaw and mulaw is allowed for now */
 static int prefformat =  AST_FORMAT_ALAW ; /*  AST_FORMAT_SLINEAR ;  AST_FORMAT_ULAW | */
-
-static ast_mutex_t usecnt_lock; 
 
 static int *misdn_debug;
 static int *misdn_debug_only;
@@ -620,7 +616,7 @@
 
 
 
-void reload_config(void)
+static void reload_config(void)
 {
 	int i, cfg_debug;
 	chan_misdn_log(-1, 0, "Dynamic Crypting Activation is not support during reload at the moment\n");
@@ -1190,7 +1186,7 @@
 
 
 
-void config_jitterbuffer(struct chan_list *ch)
+static void config_jitterbuffer(struct chan_list *ch)
 {
 	struct misdn_bchannel *bc=ch->bc;
 	int len=ch->jb_len, threshold=ch->jb_upper_threshold;
@@ -2188,7 +2184,7 @@
 
 
 
-enum ast_bridge_result  misdn_bridge (struct ast_channel *c0,
+static enum ast_bridge_result  misdn_bridge (struct ast_channel *c0,
 				      struct ast_channel *c1, int flags,
 				      struct ast_frame **fo,
 				      struct ast_channel **rc,
@@ -2517,7 +2513,7 @@
 }
 
 
-int misdn_send_text (struct ast_channel *chan, const char *text)
+static int misdn_send_text (struct ast_channel *chan, const char *text)
 {
 	struct chan_list *tmp=chan->tech_pvt;
 	
@@ -3827,7 +3823,7 @@
 
 static int g_config_initialized=0;
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	/* First, take us out of the channel loop */
 	ast_log(LOG_VERBOSE, "-- Unregistering mISDN Channel Driver --\n");
@@ -3872,7 +3868,7 @@
 	return 0;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	int i;
 	
@@ -3927,7 +3923,7 @@
 	{
 		if (ast_channel_register(&misdn_tech)) {
 			ast_log(LOG_ERROR, "Unable to register channel class %s\n", misdn_type);
-			unload_module();
+			unload_module(mod);
 			return -1;
 		}
 	}
@@ -3979,28 +3975,19 @@
 
 
 
-int reload(void)
+static int reload(void *mod)
 {
 	reload_config();
 
 	return 0;
 }
 
-int usecount(void)
-{
-	int res;
-	ast_mutex_lock(&usecnt_lock);
-	res = usecnt;
-	ast_mutex_unlock(&usecnt_lock);
-	return res;
-}
-
-const char *description(void)
+static const char *description(void)
 {
 	return desc;
 }
 
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
@@ -4480,4 +4467,4 @@
 	}
 }
 
-
+STD_MOD(MOD_0, reload, NULL, NULL);

Modified: team/group/autoconf_and_menuselect/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_sip.c?rev=22110&r1=22109&r2=22110&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_sip.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_sip.c Fri Apr 21 16:37:13 2006
@@ -1162,7 +1162,7 @@
 /*! \brief Initialize the initital request packet in the pvt structure.
  	This packet is used for creating replies and future requests in
 	a dialog */
-void initialize_initreq(struct sip_pvt *p, struct sip_request *req)
+static void initialize_initreq(struct sip_pvt *p, struct sip_request *req)
 {
 	if (p->initreq.headers) {
 		ast_log(LOG_WARNING, "Initializing already initialized SIP dialog??? %s\n", p->callid);
@@ -5830,7 +5830,8 @@
 }
 
 /*! \brief Allocate SIP refer structure */
-int sip_refer_allocate(struct sip_pvt *p) {
+static int sip_refer_allocate(struct sip_pvt *p)
+{
 	p->refer = ast_calloc(1, sizeof(struct sip_refer)); 
 	return p->refer ? 1 : 0;
 }
@@ -9548,7 +9549,7 @@
 
 
 /*! \brief  func_header_read: Read SIP header (dialplan function) */
-int func_header_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len) 
+static int func_header_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len) 
 {
 	struct sip_pvt *p;
 	const char *content;
@@ -9594,7 +9595,7 @@
 };
 
 /*! \brief  Dial plan function to check if domain is local */
-int func_check_sipdomain(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
+static int func_check_sipdomain(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
 {
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "CHECKSIPDOMAIN requires an argument - A domain name\n");
@@ -9712,7 +9713,7 @@
 };
 
 /*! \brief ${SIPCHANINFO()} Dialplan function - reads sip channel data */
-int function_sipchaninfo_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) 
+static int function_sipchaninfo_read(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) 
 {
 	struct sip_pvt *p;
 	char iabuf[INET_ADDRSTRLEN];

Modified: team/group/autoconf_and_menuselect/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_zap.c?rev=22110&r1=22109&r2=22110&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_zap.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_zap.c Fri Apr 21 16:37:13 2006
@@ -950,7 +950,7 @@
 		close(fd);
 }
 
-int zt_setlinear(int zfd, int linear)
+static int zt_setlinear(int zfd, int linear)
 {
 	int res;
 	res = ioctl(zfd, ZT_SETLINEAR, &linear);
@@ -960,7 +960,7 @@
 }
 
 
-int zt_setlaw(int zfd, int law)
+static int zt_setlaw(int zfd, int law)
 {
 	int res;
 	res = ioctl(zfd, ZT_SETLAW, &law);
@@ -1526,7 +1526,7 @@
 	}
 }
 
-int set_actual_txgain(int fd, int chan, float gain, int law)
+static int set_actual_txgain(int fd, int chan, float gain, int law)
 {
 	struct zt_gains g;
 	int res;
@@ -1544,7 +1544,7 @@
 	return ioctl(fd, ZT_SETGAINS, &g);
 }
 
-int set_actual_rxgain(int fd, int chan, float gain, int law)
+static int set_actual_rxgain(int fd, int chan, float gain, int law)
 {
 	struct zt_gains g;
 	int res;
@@ -1562,7 +1562,7 @@
 	return ioctl(fd, ZT_SETGAINS, &g);
 }
 
-int set_actual_gain(int fd, int chan, float rxgain, float txgain, int law)
+static int set_actual_gain(int fd, int chan, float rxgain, float txgain, int law)
 {
 	return set_actual_txgain(fd, chan, txgain, law) | set_actual_rxgain(fd, chan, rxgain, law);
 }
@@ -1669,7 +1669,7 @@
 
 static int send_callerid(struct zt_pvt *p);
 
-int send_cwcidspill(struct zt_pvt *p)
+static int send_cwcidspill(struct zt_pvt *p)
 {
 	p->callwaitcas = 0;
 	p->cidcwexpire = 0;
@@ -2292,7 +2292,7 @@
 	return 0;
 }
 
-int pri_is_up(struct zt_pri *pri)
+static int pri_is_up(struct zt_pri *pri)
 {
 	int x;
 	for (x=0;x<NUM_DCHANS;x++) {
@@ -2302,7 +2302,7 @@
 	return 0;
 }
 
-int pri_assign_bearer(struct zt_pvt *crv, struct zt_pri *pri, struct zt_pvt *bearer)
+static int pri_assign_bearer(struct zt_pvt *crv, struct zt_pri *pri, struct zt_pvt *bearer)
 {
 	bearer->owner = &inuse;
 	bearer->realcall = crv;
@@ -2332,7 +2332,7 @@
 }
 
 /* Returns fd of the active dchan */
-int pri_active_dchan_fd(struct zt_pri *pri)
+static int pri_active_dchan_fd(struct zt_pri *pri)
 {
 	int x = -1;
 
@@ -2344,7 +2344,7 @@
 	return pri->fds[x];
 }
 
-int pri_find_dchan(struct zt_pri *pri)
+static int pri_find_dchan(struct zt_pri *pri)
 {
 	int oldslot = -1;
 	struct pri *old;
@@ -8192,7 +8192,8 @@
 	ast_mutex_lock(&pri->lock);
 	return 0;
 }
-char * redirectingreason2str(int redirectingreason)
+
+static char * redirectingreason2str(int redirectingreason)
 {
 	switch (redirectingreason) {
 	case 0:



More information about the asterisk-commits mailing list