diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-09-25 22:10:09 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-09-25 22:10:09 +0000 |
commit | a5d2fdac0830b70e35828669e22e7145f7162e36 (patch) | |
tree | 32a169538e427239a862caa124316cd68cd9eca9 /fasthdlc.h | |
parent | d5bfe835fa4aa0af3e3d9cab7690f4a6ca34483f (diff) |
Version 0.3.1 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@110 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'fasthdlc.h')
-rwxr-xr-x | fasthdlc.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -206,6 +206,11 @@ static inline unsigned int hdlc_frame_precalc(unsigned char x, unsigned short c) } c <<= 1; } + /* Consume the extra 0 now rather than later. */ + if (ones == 5) { + ones = 0; + consumed++; + } return HFP(STATUS_VALID, ones, consumed, data); } @@ -441,9 +446,10 @@ static inline int fasthdlc_rx_run(struct fasthdlc_state *h) retval = (RETURN_COMPLETE_FLAG); /* Stay in this state */ h->state = 1; - } else + } else { /* An abort (either out of sync of explicit) */ retval = (RETURN_DISCARD_FLAG); + } break; case STATUS_VALID: retval = (next & DATA_MASK); |