[Asterisk-cvs] zaptel wcfxs.c,1.38,1.39

markster at lists.digium.com markster at lists.digium.com
Sun Nov 23 16:43:26 CST 2003


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv25110

Modified Files:
	wcfxs.c 
Log Message:
Supply on hook transfer


Index: wcfxs.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxs.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- wcfxs.c	7 Nov 2003 21:40:03 -0000	1.38
+++ wcfxs.c	23 Nov 2003 23:09:46 -0000	1.39
@@ -1047,6 +1047,17 @@
 			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;
 	}




More information about the svn-commits mailing list