diff options
-rwxr-xr-x | wcfxs.c | 2 | ||||
-rwxr-xr-x | wctdm.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1366,7 +1366,7 @@ static int wcfxs_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long dat return -EFAULT; break; case WCFXS_GET_REGS: - if (wc->modtype == MOD_TYPE_FXS) { + if (wc->modtype[chan->chanpos - 1] == MOD_TYPE_FXS) { for (x=0;x<NUM_INDIRECT_REGS;x++) regs.indirect[x] = wcfxs_proslic_getreg_indirect(wc, chan->chanpos -1, x); for (x=0;x<NUM_REGS;x++) @@ -1366,7 +1366,7 @@ static int wcfxs_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long dat return -EFAULT; break; case WCFXS_GET_REGS: - if (wc->modtype == MOD_TYPE_FXS) { + if (wc->modtype[chan->chanpos - 1] == MOD_TYPE_FXS) { for (x=0;x<NUM_INDIRECT_REGS;x++) regs.indirect[x] = wcfxs_proslic_getreg_indirect(wc, chan->chanpos -1, x); for (x=0;x<NUM_REGS;x++) |