[svn-commits] tzafrir: trunk r1391 - /trunk/xpp/
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Mon Sep 4 16:01:04 MST 2006
Author: tzafrir
Date: Mon Sep 4 18:01:03 2006
New Revision: 1391
URL: http://svn.digium.com/view/zaptel?rev=1391&view=rev
Log:
Rename the bitmask xpd->hookstate into xpd->offhook (for readability).
Modified:
trunk/xpp/card_fxo.c
trunk/xpp/card_fxs.c
trunk/xpp/xpd.h
trunk/xpp/xpp_zap.c
trunk/xpp/xproto.h
Modified: trunk/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/card_fxo.c?rev=1391&r1=1390&r2=1391&view=diff
==============================================================================
--- trunk/xpp/card_fxo.c (original)
+++ trunk/xpp/card_fxo.c Mon Sep 4 18:01:03 2006
@@ -259,9 +259,9 @@
mark_ring(xpd, pos, 0); // No more rings
__do_sethook(xpd->xbus, xpd, pos, offhook);
if(offhook) {
- BIT_SET(xpd->hookstate, pos);
+ BIT_SET(xpd->offhook, pos);
} else {
- BIT_CLR(xpd->hookstate, pos);
+ BIT_CLR(xpd->offhook, pos);
xpd->delay_until_dialtone[pos] = 0;
}
spin_unlock_irqrestore(&xpd->lock, flags);
Modified: trunk/xpp/card_fxs.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/card_fxs.c?rev=1391&r1=1390&r2=1391&view=diff
==============================================================================
--- trunk/xpp/card_fxs.c (original)
+++ trunk/xpp/card_fxs.c Mon Sep 4 18:01:03 2006
@@ -821,10 +821,10 @@
BIT_CLR(lines, channo);
BIT_SET(lines, newchanno);
xpd->ringing[newchanno] = 0; // Stop ringing. No leds for digital inputs.
- if(offhook && !IS_SET(xpd->hookstate, newchanno)) { // OFFHOOK
+ if(offhook && !IS_SET(xpd->offhook, newchanno)) { // OFFHOOK
DBG("%s/%s/%d: OFFHOOK\n", xbus->busname, xpd->xpdname, newchanno);
update_line_status(xpd, newchanno, 1);
- } else if(!offhook && IS_SET(xpd->hookstate, newchanno)) { // ONHOOK
+ } else if(!offhook && IS_SET(xpd->offhook, newchanno)) { // ONHOOK
DBG("%s/%s/%d: ONHOOK\n", xbus->busname, xpd->xpdname, newchanno);
update_line_status(xpd, newchanno, 0);
}
Modified: trunk/xpp/xpd.h
URL: http://svn.digium.com/view/zaptel/trunk/xpp/xpd.h?rev=1391&r1=1390&r2=1391&view=diff
==============================================================================
--- trunk/xpp/xpd.h (original)
+++ trunk/xpp/xpd.h Mon Sep 4 18:01:03 2006
@@ -243,7 +243,7 @@
byte revision; /* Card revision */
xpd_direction_t direction; /* TO_PHONE, TO_PSTN */
xpp_line_t no_pcm; /* Temporary: disable PCM (for USB-1) */
- xpp_line_t hookstate; /* Actual chip state: 0 - ONHOOK, 1 - OFHOOK */
+ xpp_line_t offhook; /* Actual chip state: 0 - ONHOOK, 1 - OFHOOK */
xpp_line_t cid_on;
xpp_line_t digital_outputs; /* 0 - no, 1 - yes */
xpp_line_t digital_inputs; /* 0 - no, 1 - yes */
Modified: trunk/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/xpp_zap.c?rev=1391&r1=1390&r2=1391&view=diff
==============================================================================
--- trunk/xpp/xpp_zap.c (original)
+++ trunk/xpp/xpp_zap.c Mon Sep 4 18:01:03 2006
@@ -399,9 +399,9 @@
for_each_line(xpd, i) {
len += sprintf(page + len, "%d ", IS_SET(xpd->digital_inputs, i));
}
- len += sprintf(page + len, "\n\t%-17s: ", "hookstate");
+ len += sprintf(page + len, "\n\t%-17s: ", "offhook");
for_each_line(xpd, i) {
- len += sprintf(page + len, "%d ", IS_SET(xpd->hookstate, i));
+ len += sprintf(page + len, "%d ", IS_SET(xpd->offhook, i));
}
len += sprintf(page + len, "\n\t%-17s: ", "ringing");
for_each_line(xpd, i) {
@@ -508,7 +508,7 @@
xpd->chans = NULL;
xpd->card_present = 0;
snprintf(xpd->xpdname, XPD_NAMELEN, "XPD-%d", xpd_num);
- xpd->hookstate = 0x0; /* ONHOOK */
+ xpd->offhook = 0x0; /* ONHOOK */
xpd->type = proto_table->type;
xpd->xproto = proto_table;
xpd->xops = &proto_table->xops;
@@ -633,10 +633,10 @@
* a nested spinlock scenario
*/
if(to_offhook) {
- BIT_SET(xpd->hookstate, pos);
+ BIT_SET(xpd->offhook, pos);
zt_hooksig(chan, ZT_RXSIG_OFFHOOK);
} else {
- BIT_CLR(xpd->hookstate, pos);
+ BIT_CLR(xpd->offhook, pos);
zt_hooksig(chan, ZT_RXSIG_ONHOOK);
}
}
@@ -902,14 +902,14 @@
wake_up_interruptible(&xpd->txstateq[i]);
}
}
- if(IS_SET(xpd->hookstate, i) || IS_SET(xpd->cid_on, i)) {
+ if(IS_SET(xpd->offhook, i) || IS_SET(xpd->cid_on, i)) {
memcpy((u_char *)w, chans[i].writechunk, ZT_CHUNKSIZE);
// fill_beep((u_char *)w, 5);
}
w += ZT_CHUNKSIZE;
}
-// if(xpd->hookstate != 0 || sync_master != xpd) {
- ret = CALL_XMETHOD(PCM_WRITE, xpd->xbus, xpd, xpd->hookstate | xpd->cid_on, writechunk);
+// if(xpd->offhook != 0 || sync_master != xpd) {
+ ret = CALL_XMETHOD(PCM_WRITE, xpd->xbus, xpd, xpd->offhook | xpd->cid_on, writechunk);
if(ret < 0) {
DBG("failed to write PCM %d\n", ret);
}
@@ -978,7 +978,7 @@
}
for (i = 0; i < channels; i++) {
- if(IS_SET(xpd->hookstate, i)) {
+ if(IS_SET(xpd->offhook, i)) {
// memset((u_char *)readchunk, 0x5A, ZT_CHUNKSIZE); // DEBUG
// fill_beep((u_char *)readchunk, 1); // DEBUG: BEEP
memcpy(chans[i].readchunk, (u_char *)readchunk, ZT_CHUNKSIZE);
@@ -1142,7 +1142,7 @@
BUG_ON(!xpd);
xbus = xpd->xbus;
- DBG("%s (%d) (old=0x%04X, hook-command=%d)\n", chan->name, pos, xpd->hookstate, hookstate);
+ DBG("%s (%d) (old=0x%04X, hook-command=%d)\n", chan->name, pos, xpd->offhook, hookstate);
ret = CALL_XMETHOD(card_sethook, xpd->xbus, xpd, pos, hookstate);
return ret;
}
Modified: trunk/xpp/xproto.h
URL: http://svn.digium.com/view/zaptel/trunk/xpp/xproto.h?rev=1391&r1=1390&r2=1391&view=diff
==============================================================================
--- trunk/xpp/xproto.h (original)
+++ trunk/xpp/xproto.h Mon Sep 4 18:01:03 2006
@@ -159,7 +159,7 @@
int (*card_ioctl)(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg);
int (*SYNC_SOURCE)(xbus_t *xbus, xpd_t *xpd, bool setit, bool is_master);
- int (*PCM_WRITE)(xbus_t *xbus, xpd_t *xpd, xpp_line_t hookstate, volatile byte *buf);
+ int (*PCM_WRITE)(xbus_t *xbus, xpd_t *xpd, xpp_line_t offhook, volatile byte *buf);
int (*CHAN_ENABLE)(xbus_t *xbus, xpd_t *xpd, xpp_line_t lines, bool on);
int (*CHAN_CID)(xbus_t *xbus, xpd_t *xpd, int pos);
More information about the svn-commits
mailing list