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>