diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-07-25 14:30:39 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-07-25 14:30:39 +0000 |
commit | 97289f2bf2deb9ca1516310baf8032e3d65df797 (patch) | |
tree | d04a700fa378489032a20ed9eed7e92bc8260edc /wcfxs.c | |
parent | c9875f2e81df5d0d1a5c0cf22fd28894390956de (diff) |
ensure that only the channel being closed is reset to idle, and only if it is an FXS module
git-svn-id: http://svn.digium.com/svn/zaptel/branches/v1-0@701 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-x | wcfxs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1704,15 +1704,15 @@ 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--; #ifndef LINUX26 MOD_DEC_USE_COUNT; #else module_put(THIS_MODULE); #endif - for (x=0;x<wc->cards;x++) - wc->mod.fxs.idletxhookstate[x] = 1; + if (wc->modtype[chan->chanpos - 1] == MOD_TYPE_FXS) + wc->mod.fxs.idletxhookstate[chan->chanpos - 1] = 1; + /* If we're dead, release us now */ if (!wc->usecount && wc->dead) wcfxs_release(wc); |