From 2889d6afee7d254990b2e5a52a7ef538f6a0d6fe Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 9 May 2013 14:03:46 -0500 Subject: [PATCH] dahdi_cfg: Make -S option based on spannumber instead of order in config file. If the config file has two spans defined: span=1,1,0,esf,b8zs bchan=1-23 dchan=24 echocanceller=mg2,1-23 span=2,2,0,esf,b8zs bchan=25-47 dchan=48 And you only want to configure span-2, you would need to pass -S 1 to dahdi_cfg. Now make the -S option take the span number as assigned in the config file. Signed-off-by: Shaun Ruffell Signed-off-by: Russ Meyerriecks --- dahdi_cfg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 3ce9ef6..3dfaf42 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -1271,7 +1271,7 @@ static void printconfig(int fd) "Configuration\n" "======================\n\n", vi.version, vi.echo_canceller); for (x = 0; x < spans; x++) { - if (only_span && only_span != x) + if (only_span && only_span != lc[x].span) continue; printf("SPAN %d: %3s/%4s Build-out: %s\n", lc[x].span, @@ -1564,7 +1564,7 @@ finish: } if (stopmode) { for (x=0;x