[Home]

Summary:DAHTOOL-00069: dahdi_cfg: -S: fails if system.conf is not as assumed
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2015-11-16 07:34:54.000-0600Date Closed:2016-02-22 09:50:19.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Utilities
Versions:2.6.0 2.10.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:DAHDI-tools 2.6.0 added the options -S and -C to run dahdi_cfg only on specific spans. The problem is that there is no direct mapping of spans to channels in system.conf.

The patch added its own mapping. However the code added relies on the assumption that the channel of each span is mentioned the first time immediately after the span= line for that span. This holds for e.g. the output of dahdi_genconf.

span=1,...
bchan=1-2
dchan=3

span=2,...
bchan=4-5
dchan=6

However, this breaks if we have a configuration file such as:

span=1,...
span=2,...
bchan=1-2,4-5
dchan=3,6

In which case, running:  'dahdi_cfg -S 1 -C 1-2' gets errors such as:

Only span 1. Skip selected channel 1 from span 2

And running: 'dahdi_cfg -S 1' will silently do nothing.
Comments:By: Tzafrir Cohen (tzafrir) 2016-02-22 09:50:19.545-0600

Fixed in commit cffc5158cc4ca9edba83387af97f6d28d74d6a0d (included in 2.11.0).

However it means that -S (only on span N) now requires -C (only on channels range M-N).