laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/30761 )
Change subject: isdndlc: Fix documentation ......................................................................
isdndlc: Fix documentation
The documentation was copied 1:1 from the Linux kernel, where it already was wrong and apparently described an earlier implementation.
Change-Id: Ib5def2ae3c79f408f2ee0bb4c20fba1437d30c64 --- M src/isdnhdlc.c 1 file changed, 3 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/30761/1
diff --git a/src/isdnhdlc.c b/src/isdnhdlc.c index 8ec1c95..4ced5af 100644 --- a/src/isdnhdlc.c +++ b/src/isdnhdlc.c @@ -97,13 +97,12 @@ When a new flag is found, the complete frame has been received and the CRC is checked. If a valid frame is found, the function returns the frame length - excluding the CRC with the bit HDLC_END_OF_FRAME set. + excluding the CRC. If the beginning of a valid frame is found, the function returns the length. If a framing error is found (too many 1s and not a flag) the function - returns the length with the bit OSMO_HDLC_FRAMING_ERROR set. - If a CRC error is found the function returns the length with the - bit OSMO_HDLC_CRC_ERROR set. + returns -OSMO_HDLC_FRAMING_ERROR. + If a CRC error is found the function returns -OSMO_HDLC_CRC_ERROR. If the frame length exceeds the destination buffer size, the function returns the length with the bit OSMO_HDLC_LENGTH_ERROR set.