diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-09-04 23:01:03 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-09-04 23:01:03 +0000 |
commit | 0305962c454019c63b6d69634e8301b9f199627b (patch) | |
tree | 8cd8d0ccb8b0af5720452d44e19fe94b0cf26e62 /xpp/xpp_zap.c | |
parent | 393ca276af8b3f2610ae82b1971fa0b5d2abb336 (diff) |
Rename the bitmask xpd->hookstate into xpd->offhook (for readability).
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1391 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xpp_zap.c')
-rw-r--r-- | xpp/xpp_zap.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xpp/xpp_zap.c b/xpp/xpp_zap.c index b805075..e0e3560 100644 --- a/xpp/xpp_zap.c +++ b/xpp/xpp_zap.c @@ -399,9 +399,9 @@ static int xpd_read_proc(char *page, char **start, off_t off, int count, int *eo 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_t *xpd_alloc(size_t privsize, xbus_t *xbus, int xpd_num, const xproto_table_ 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 @@ void update_line_status(xpd_t *xpd, int pos, bool to_offhook) * 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 @@ static void xpp_transmitprep(xpd_t *xpd) 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 @@ static void xpp_receiveprep(xpd_t *xpd) } 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 @@ static int xpp_sethook(struct zt_chan *chan, int hookstate) 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; } |