dahdi_cfg: -S has assumtions on system.conf order
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 16 Nov 2015 13:01:52 +0000 (15:01 +0200)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 16 Nov 2015 13:54:23 +0000 (15:54 +0200)
commitcffc5158cc4ca9edba83387af97f6d28d74d6a0d
treee32aee885c666f7e72b21e57d9cff14d9c642259
parent42850dba3555005315fecac37b2e3c6ed9af73a6
dahdi_cfg: -S has assumtions on system.conf order

dahdi_cfg's -S (apply only to a specific span) uses the array chan2span
to map channel numbers to span numbers.

The problem is that it assumes that channels first appear in system.conf
immediately after the span line of a specific span. Thus the following
configuration breaks it:

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

The best fix for that is to require -C to be used when -S is used (which
is already the case in our udev hooks).

Fixes DAHTOOL-69.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
dahdi_cfg.c
doc/dahdi_cfg.8