dahdi_cfg: Warn if idle bits are set on invalid channel type.
Hopefully will save a little time in the future if anyone ever types into /etc/dahdi/system.conf: bchan=1-15,17-30:1101 when they meant: cas=1-15,17-30:1101 in the future. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
parent
8045f7f493
commit
49361e5ce7
@ -762,6 +762,15 @@ static int chanconfig(char *keyword, char *args)
|
|||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Huh? (%s)\n", keyword);
|
fprintf(stderr, "Huh? (%s)\n", keyword);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cc[x].sigtype != DAHDI_SIG_CAS &&
|
||||||
|
cc[x].sigtype != DAHDI_SIG_DACS &&
|
||||||
|
cc[x].sigtype != DAHDI_SIG_DACS_RBS) {
|
||||||
|
if (NULL != idle) {
|
||||||
|
fprintf(stderr, "WARNING: idlebits are not valid on %s channels.\n", sig[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (is_digital)
|
if (is_digital)
|
||||||
chan2span[x] = current_span;
|
chan2span[x] = current_span;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user