xpp: fix failed multi-PRI E1<->T1 transition
In an Astribank with >= 2 PRI ports, switching from E1 to T1 at run-time may fail at the DAHDI_CHANCONFIG ioctl on the first channel in a span, That is, on first run of dahdi_cfg, it fails on second span, on second: it fails on third span, etc. The code clears the D-channel information on the DAHDI_CHANCONFIG call for the first channel in the span. However The code tested for the global "channo" rather than the per-span "chanpos" to check for the first channel in the span. This the test failed. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
committed by
Tzafrir Cohen
parent
adfd0910b7
commit
606dd58a47
@@ -1231,7 +1231,7 @@ static int pri_chanconfig(struct file *file, struct dahdi_chan *chan,
|
||||
if (priv->pri_protocol != PRI_PROTO_E1 && priv->is_cas != 0)
|
||||
set_mode_cas(xpd, 0);
|
||||
} else {
|
||||
if (chan->channo == 1) {
|
||||
if (chan->chanpos == 1) {
|
||||
XPD_DBG(GENERAL, xpd,
|
||||
"channel %d (%s) marked a not DChan\n",
|
||||
chan->channo, chan->name);
|
||||
|
||||
Reference in New Issue
Block a user