summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-05 18:11:54 +0000
committerqwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-05 18:11:54 +0000
commit7985fc9ce30759c0f23871489fe8eb5260aaece3 (patch)
tree7eea1deb3ed73d9a2d43d5ccaf9b53f015188565
parent073e09afdb1c46b474efa6bd5e959d94e4b4aea7 (diff)
Merged revisions 2697 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4 Closes issue 7612. ................ r2697 | qwell | 2007-07-05 13:10:29 -0500 (Thu, 05 Jul 2007) | 13 lines Merged revisions 2696 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r2696 | qwell | 2007-07-05 13:08:53 -0500 (Thu, 05 Jul 2007) | 5 lines Do not report channels in ZT_STATE_KEWL or ZT_STATE_AFTERKEWL (ie; battery drop) states as available. This becomes more likely if ZT_KEWLTIME or ZT_AFTERKEWLTIME are set to higher values. Issue 7612, patch by rbraun. ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2698 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--zaptel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/zaptel.c b/zaptel.c
index 814cb30..d696fae 100644
--- a/zaptel.c
+++ b/zaptel.c
@@ -2994,12 +2994,14 @@ static int zt_common_ioctl(struct inode *node, struct file *file, unsigned int c
j = zt_q_sig(chan);
if (j >= 0) { /* if returned with success */
stack.param.rxisoffhook = ((chan->rxsig & (j >> 8)) != (j & 0xff));
- }
- else {
+ } else {
stack.param.rxisoffhook = ((chan->rxhooksig != ZT_RXSIG_ONHOOK) &&
(chan->rxhooksig != ZT_RXSIG_INITIAL));
}
- } else stack.param.rxisoffhook = 0;
+ } else if ((chan->txstate == ZT_TXSTATE_KEWL) || (chan->txstate == ZT_TXSTATE_AFTERKEWL))
+ stack.param.rxisoffhook = 1;
+ else
+ stack.param.rxisoffhook = 0;
if (chan->span && chan->span->rbsbits && !(chan->sig & ZT_SIG_CLEAR)) {
stack.param.rxbits = chan->rxsig;
stack.param.txbits = chan->txsig;