summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2010-05-04 15:33:28 +0000
committerKevin P. Fleming <kpfleming@digium.com>2010-05-04 15:33:28 +0000
commit60cb4abda89ae0f9bdd2cc1f2f628affdcc423f5 (patch)
treeab9660b6216657b8326d3dcf88af2d212c17d1fe
parentc7dfdc2f92e422a03b0cd50d85072bbef358d84e (diff)
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. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@8606 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--dahdi_cfg.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/dahdi_cfg.c b/dahdi_cfg.c
index 6c6ffad..25ea6a5 100644
--- a/dahdi_cfg.c
+++ b/dahdi_cfg.c
@@ -1280,15 +1280,17 @@ static void printconfig(int fd)
"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);