summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-07-20 13:05:47 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-07-20 13:05:47 +0000
commit9fa59077adb83278885b331047f94af581737de4 (patch)
tree2e3a948f36809c03ca476ef5400d2091610d45a7
parentaf4a13e4df9635a4fb2c9720897404919d0d20ca (diff)
Only set idlemode on current channel....
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@697 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xwctdm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/wctdm.c b/wctdm.c
index f709005..d25fd16 100755
--- a/wctdm.c
+++ b/wctdm.c
@@ -1788,17 +1788,15 @@ static int wctdm_watchdog(struct zt_span *span, int event)
static int wctdm_close(struct zt_chan *chan)
{
struct wctdm *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++) {
- if (wc->modtype[x] == MOD_TYPE_FXS)
- wc->mod.fxs.idletxhookstate[x] = 1;
- }
+ if (wc->modtype[chan->chanpos - 1])
+ wc->mod.fxs.idletxhookstate[chan->chanpos - 1] = 1;
+
/* If we're dead, release us now */
if (!wc->usecount && wc->dead)
wctdm_release(wc);