[Asterisk-cvs] zaptel ztmonitor.c,1.8,1.9

markster at lists.digium.com markster at lists.digium.com
Wed Nov 3 22:51:18 CST 2004


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

Modified Files:
	ztmonitor.c 
Log Message:
ztmonitor updates


Index: ztmonitor.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztmonitor.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ztmonitor.c	23 Feb 2004 20:22:57 -0000	1.8
+++ ztmonitor.c	4 Nov 2004 03:53:37 -0000	1.9
@@ -58,6 +58,8 @@
 static FILE*  ofh = 0;
 
 static int stereo = 0;
+static int verbose = 0;
+
 int audio_open(void)
 {
 	int fd;
@@ -233,6 +235,8 @@
 	draw_bar(rxbest, rxmax);
 	printf("   ");
 	draw_bar(txbest, txmax);
+	if (verbose)
+		printf("   Rx: %5d (%5d) Tx: %5d (%5d)", rxbest, rxmax, txbest, txmax);
 	txbest = 0;
 	rxbest = 0;
 	
@@ -261,13 +265,18 @@
 	struct zt_confinfo zc;
 
 	if ((argc < 2) || (atoi(argv[1]) < 1)) {
-		fprintf(stderr, "Usage: ztmonitor <channel num> [-v] [-f FILE]\n");
+		fprintf(stderr, "Usage: ztmonitor <channel num> [-v[v]] [-f FILE]\n");
 		exit(1);
 	}
 	for (i = 2; i < argc; ++i) {
-		if (!strcmp(argv[i], "-v"))
+		if (!strcmp(argv[i], "-v")) {
+				if (visual)
+					verbose = 1;
 		        visual = 1;
-       		else if (!strcmp(argv[i], "-f") && (i+1) < argc) {
+		} else if (!strcmp(argv[i], "-vv")) {
+			visual = 1;
+			verbose = 1;
+       	} else if (!strcmp(argv[i], "-f") && (i+1) < argc) {
 			++i; /*we care about hte file name */
 			if (strlen(argv[i]) < 255 ) {
 				strcpy(output_file, argv[i]);




More information about the svn-commits mailing list