[svn-commits] kpfleming: tools/trunk r8606 - /tools/trunk/dahdi_cfg.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 4 10:33:31 CDT 2010


Author: kpfleming
Date: Tue May  4 10:33:28 2010
New Revision: 8606

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8606
Log:
Report correct span number in dahdi_cfg verbose output.

When the DAHDI configuration file does not configure every single span in the system,
but leaves spans unconfigured, the verbose output from dahdi_cfg would show incorrect
span numbers when reporting the line configuration, as it printed the index into the
array of configured spans, instead of their actual span numbers.


Modified:
    tools/trunk/dahdi_cfg.c

Modified: tools/trunk/dahdi_cfg.c
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/dahdi_cfg.c?view=diff&rev=8606&r1=8605&r2=8606
==============================================================================
--- tools/trunk/dahdi_cfg.c (original)
+++ tools/trunk/dahdi_cfg.c Tue May  4 10:33:28 2010
@@ -1280,15 +1280,17 @@
 	       "Echo Canceller(s): %s\n"
 	       "Configuration\n"
 	       "======================\n\n", vi.version, vi.echo_canceller);
-	for (x=0;x<spans;x++) 
+	for (x = 0; x < spans; x++) {
 		printf("SPAN %d: %3s/%4s Build-out: %s\n",
-		       x+1, ( lc[x].lineconfig & DAHDI_CONFIG_D4 ? "D4" :
-			      lc[x].lineconfig & DAHDI_CONFIG_ESF ? "ESF" :
-			      lc[x].lineconfig & DAHDI_CONFIG_CCS ? "CCS" : "CAS" ),
-			( lc[x].lineconfig & DAHDI_CONFIG_AMI ? "AMI" :
-			  lc[x].lineconfig & DAHDI_CONFIG_B8ZS ? "B8ZS" :
-			  lc[x].lineconfig & DAHDI_CONFIG_HDB3 ? "HDB3" : "???" ),
-			lbostr[lc[x].lbo]);
+		       lc[x].span,
+		       (lc[x].lineconfig & DAHDI_CONFIG_D4 ? "D4" :
+			lc[x].lineconfig & DAHDI_CONFIG_ESF ? "ESF" :
+			lc[x].lineconfig & DAHDI_CONFIG_CCS ? "CCS" : "CAS"),
+		       (lc[x].lineconfig & DAHDI_CONFIG_AMI ? "AMI" :
+			lc[x].lineconfig & DAHDI_CONFIG_B8ZS ? "B8ZS" :
+			lc[x].lineconfig & DAHDI_CONFIG_HDB3 ? "HDB3" : "???"),
+		       lbostr[lc[x].lbo]);
+	}
 	for (x=0;x<numdynamic;x++) {
 		printf("Dynamic span %d: driver %s, addr %s, channels %d, timing %d\n",
 		       x +1, zds[x].driver, zds[x].addr, zds[x].numchans, zds[x].timing);




More information about the svn-commits mailing list