[Asterisk-cvs] asterisk/channels chan_h323.c,1.24,1.25

jeremy at lists.digium.com jeremy at lists.digium.com
Sat Jan 10 20:28:15 CST 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv14411

Modified Files:
	chan_h323.c 
Log Message:
clean up code and remove unnecessary debug


Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- chan_h323.c	10 Jan 2004 17:16:59 -0000	1.24
+++ chan_h323.c	11 Jan 2004 02:20:01 -0000	1.25
@@ -68,15 +68,15 @@
 static char default_context[AST_MAX_EXTENSION];
 
 /** H.323 configuration values */
+static struct sockaddr_in bindaddr;
 static char gatekeeper[100];
-static int	gatekeeper_disable = 1;
-static int	gatekeeper_discover = 0;
+static int  gatekeeper_disable = 1;
+static int  gatekeeper_discover = 0;
 static int  usingGk;
-static int	port = 1720;
+static int  port = 1720;
 static int  gkroute = 0;
 
-/* to find user by alias is default, alternative is the incomming call's source IP 
-address*/
+/* to find user by alias is default, alternative is the incomming call's source IP address*/
 static int  userbyalias = 1;
 
 static int  bridge_default = 1;
@@ -1287,9 +1287,9 @@
 
 static int h323_do_trace(int fd, int argc, char *argv[])
 {
-	if (argc != 3)
+	if (argc != 3) {
 		return RESULT_SHOWUSAGE;
-	
+	}
 	h323_debug(1, atoi(argv[2]));
 	ast_cli(fd, "H.323 trace set to level %s\n", argv[2]);
 	return RESULT_SUCCESS;
@@ -1297,9 +1297,9 @@
 
 static int h323_no_trace(int fd, int argc, char *argv[])
 {
-	if (argc != 3)
+	if (argc != 3) {
 		return RESULT_SHOWUSAGE;
-
+	}
 	h323_debug(0,0);
 	ast_cli(fd, "H.323 trace disabled\n");
 	return RESULT_SUCCESS;
@@ -1307,9 +1307,9 @@
 
 static int h323_do_debug(int fd, int argc, char *argv[])
 {
-	if (argc != 2)
+	if (argc != 2) {
 		return RESULT_SHOWUSAGE;
-	
+	}
 	h323debug = 1;
 	ast_cli(fd, "H323 debug enabled\n");
 	return RESULT_SUCCESS;
@@ -1317,9 +1317,9 @@
 
 static int h323_no_debug(int fd, int argc, char *argv[])
 {
-	if (argc != 3)
+	if (argc != 3) {
 		return RESULT_SHOWUSAGE;
-
+	}
 	h323debug = 0;
 	ast_cli(fd, "H323 Debug disabled\n");
 	return RESULT_SUCCESS;
@@ -1327,27 +1327,26 @@
 
 static int h323_gk_cycle(int fd, int argc, char *argv[])
 {
-	if (argc != 3)
+	if (argc != 3) {
 		return RESULT_SHOWUSAGE;
-		
+	}	
 	h323_gk_urq();
 	
 	/* Possibly register with a GK */
-	if (gatekeeper_disable == 0) {
+	if (!gatekeeper_disable) {
 		if (h323_set_gk(gatekeeper_discover, gatekeeper, secret)) {
 			ast_log(LOG_ERROR, "Gatekeeper registration failed.\n");
-			h323_end_process();
 		}
 	}
-
 	return RESULT_SUCCESS;
 }
 
 static int h323_ep_hangup(int fd, int argc, char *argv[])
 {
 
-        if (argc != 3)
+        if (argc != 3) {
                 return RESULT_SHOWUSAGE;
+	}
 
 	if (h323_soft_hangup(argv[2])) {
 		ast_verbose(VERBOSE_PREFIX_3 "Hangup succeeded on %s\n", argv[2]);
@@ -1361,9 +1360,9 @@
 static int h323_tokens_show(int fd, int argc, char *argv[])
 {
 
-        if (argc != 3)
+        if (argc != 3) {
                 return RESULT_SHOWUSAGE;
-
+	}
 	h323_show_tokens();
 
 	return RESULT_SUCCESS;
@@ -1814,6 +1813,8 @@
 	}
 	return res;
 }
+
+
 int unload_module() 
 {
 	struct oh323_pvt *p, *pl;
@@ -1865,9 +1866,8 @@
 	/* unregister channel type */
 	ast_channel_unregister(type);
 
-	return 0;
-
-}
+	return 0; 
+} 
 
 int usecount()
 {




More information about the svn-commits mailing list