[Asterisk-cvs] zaptel ztcfg.c,1.19,1.20

markster at lists.digium.com markster at lists.digium.com
Sun Jan 9 22:02:31 CST 2005


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv28604

Modified Files:
	ztcfg.c 
Log Message:
Make debug settable (thanks twisted, bug #3302)


Index: ztcfg.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztcfg.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- ztcfg.c	22 Dec 2004 04:44:26 -0000	1.19
+++ ztcfg.c	10 Jan 2005 04:06:49 -0000	1.20
@@ -1096,6 +1096,7 @@
 		"  -c <filename>     -- Use <filename> instead of " CONFIG_FILENAME "\n"
 		"  -h                -- Generate this help statement\n"
 		"  -v                -- Verbose (more -v's means more verbose)\n"
+		"  -d [level]        -- Generate debugging output. (Default level is 1.)\n"
 		"  -t                -- Test mode only, do not apply\n"
 		"  -s                -- Shutdown spans only\n"
 	,c);
@@ -1108,7 +1109,7 @@
 	char *buf;
 	char *key, *value;
 	int x,found;
-	while((c = getopt(argc, argv, "thc:vs")) != -1) {
+	while((c = getopt(argc, argv, "thc:vsd::")) != -1) {
 		switch(c) {
 		case 'c':
 			filename=optarg;
@@ -1128,6 +1129,12 @@
 		case 's':
 			stopmode = 1;
 			break;
+		case 'd':
+			if (optarg)
+				debug = atoi(optarg);
+			else
+				debug = 1;	
+			break;
 		}
 	}
 	if (fd == -1) fd = open(MASTER_DEVICE, O_RDWR);




More information about the svn-commits mailing list