diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-11-23 23:09:46 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-11-23 23:09:46 +0000 |
commit | 83cdd96c6b999f327aab0c8fbbf1a4eed7d36076 (patch) | |
tree | edd69a1a2d7ea4ce8fdc456af64006a1bc3b9c00 /wctdm.c | |
parent | 786f3d3556dde4fd88c35e841c545b6ec47c4eda (diff) |
Supply on hook transfer
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@284 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm.c')
-rwxr-xr-x | wctdm.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1047,6 +1047,17 @@ static int wcfxs_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long dat wcfxs_setreg(wc, chan->chanpos - 1, regop.reg, regop.val); } break; + case ZT_ONHOOKTRANSFER: + if (copy_from_user(&x, (int *)data, sizeof(x))) + return -EFAULT; + /* RINGing, prepare for OHT */ + wc->ohttimer[x] = x << 3; + wc->idletxhookstate[chan->chanpos - 1] = 0x2; /* OHT mode when idle */ + if (!wc->lasttxhook[chan->chanpos - 1]) { + wc->lasttxhook[chan->chanpos-1] = wc->idletxhookstate[chan->chanpos-1]; + wcfxs_setreg(wc, chan->chanpos - 1, 64, wc->lasttxhook[chan->chanpos-1]); + } + break; default: return -ENOTTY; } |