diff options
Diffstat (limited to 'wctdm.c')
-rwxr-xr-x | wctdm.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -679,8 +679,8 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card) unsigned short tmp[5]; int x; - /* By default, always send on hook */ - wc->idletxhookstate [card] = 2; + /* By default, don't send on hook */ + wc->idletxhookstate [card] = 1; /* Sanity check the ProSLIC */ if (wcfxs_proslic_insane(wc, card)) @@ -904,11 +904,14 @@ static int wcfxs_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long dat static int wcfxs_open(struct zt_chan *chan) { struct wcfxs *wc = chan->pvt; + int x; if (!(wc->cardflag & (1 << (chan->chanpos - 1)))) return -ENODEV; if (wc->dead) return -ENODEV; wc->usecount++; + for (x=0;x<wc->cards;x++) + wc->idletxhookstate[x] = 2; MOD_INC_USE_COUNT; return 0; } @@ -923,8 +926,11 @@ static int wcfxs_watchdog(struct zt_span *span, int event) static int wcfxs_close(struct zt_chan *chan) { struct wcfxs *wc = chan->pvt; + int x; wc->usecount--; MOD_DEC_USE_COUNT; + for (x=0;x<wc->cards;x++) + wc->idletxhookstate[x] = 1; /* If we're dead, release us now */ if (!wc->usecount && wc->dead) wcfxs_release(wc); |