[svn-commits] kpfleming: branch 1.4 r3291 - /branches/1.4/ztscan.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 4 11:53:41 CST 2007


Author: kpfleming
Date: Tue Dec  4 11:53:40 2007
New Revision: 3291

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3291
Log:
eliminate the 'general' section from the ztscan output, as it doesn't contain anything the GUI needs and one user is concerned about the 'totalspans' number having to be kept in sync if the output is edited

Modified:
    branches/1.4/ztscan.c

Modified: branches/1.4/ztscan.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/ztscan.c?view=diff&rev=3291&r1=3290&r2=3291
==============================================================================
--- branches/1.4/ztscan.c (original)
+++ branches/1.4/ztscan.c Tue Dec  4 11:53:40 2007
@@ -44,12 +44,10 @@
 {
 	int ctl;
 	int x, y;
-	int hasgeneral = 0;
 	struct zt_params params;
 	unsigned int basechan = 1;
 	struct zt_spaninfo s;
 	char buf[100];
-	int totalspans = ZT_MAX_SPANS;
 	char alarms[50];
 
 	if ((ctl = open("/dev/zap/ctl", O_RDWR)) < 0) {
@@ -57,17 +55,11 @@
 		exit(1);
 	}
 	
-	for (x = 1; x < totalspans; x++) {
+	for (x = 1; x < ZT_MAX_SPANS; x++) {
 		memset(&s, 0, sizeof(s));
 		s.spanno = x;
 		if (ioctl(ctl, ZT_SPANSTAT, &s))
 			continue;
-
-		if (!hasgeneral) {
-			fprintf(stdout, "[general]\ntotalspans=%d\n", s.totalspans);
-			hasgeneral++;
-			totalspans = s.totalspans;
-		}
 
 		alarms[0] = '\0';
 		if (s.alarms) {
@@ -174,8 +166,5 @@
 		basechan += s.totalchans;
 	}
 
-	if (!hasgeneral)
-		fprintf(stdout, "[general]\ntotalspans=0\nerror=No Spans Found\n");
-
 	exit(0);
 }




More information about the svn-commits mailing list