diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 30add83..ecd4477 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -90,11 +90,9 @@ static struct dahdi_lineconfig lc[DAHDI_MAX_SPANS]; static struct dahdi_chanconfig cc[DAHDI_MAX_CHANNELS]; -static int current_span = 0; static int only_span = 0; static int restrict_channels = 0; static int selected_channels[DAHDI_MAX_CHANNELS]; -static int chan2span[DAHDI_MAX_CHANNELS]; static int declared_spans[DAHDI_MAX_SPANS]; static struct dahdi_attach_echocan ae[DAHDI_MAX_CHANNELS]; @@ -333,20 +331,9 @@ static char *trim(char *buf) static int skip_channel(int x) { - int spanno = chan2span[x]; - if (restrict_channels) { if (!selected_channels[x]) return 1; - /* sanity check */ - if (only_span) { - if (spanno != 0 && only_span != spanno) { - fprintf(stderr, - "Only span %d. Skip selected channel %d from span %d\n", - only_span, x, spanno); - return 1; - } - } } else { if (only_span && !declared_spans[only_span]) { fprintf(stderr, @@ -354,8 +341,6 @@ static int skip_channel(int x) only_span); exit(1); } - if (only_span && only_span != spanno) - return 1; } return 0; } @@ -442,7 +427,6 @@ int spanconfig(char *keyword, char *args) error("Span number should be a valid span number, not '%s'\n", realargs[0]); return -1; } - current_span = span; declared_spans[span] = 1; res = sscanf(realargs[1], "%d", &timing); if ((res != 1) || (timing < 0) || (timing > MAX_TIMING)) { @@ -615,7 +599,6 @@ static int chanconfig(char *keyword, char *args) int master=0; int dacschan = 0; char *idle; - int is_digital; bzero(chans, sizeof(chans)); strtok(args, ":"); idle = strtok(NULL, ":"); @@ -627,7 +610,6 @@ static int chanconfig(char *keyword, char *args) if (res <= 0) return -1; for (x=1;x