laforge submitted this change.

View Change

Approvals: laforge: Looks good to me, approved; Verified dexter: Looks good to me, but someone else must approve
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/core/isdnhdlc.c
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/core/isdnhdlc.c b/src/core/isdnhdlc.c
index 8ec1c95..4ced5af 100644
--- a/src/core/isdnhdlc.c
+++ b/src/core/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.


To view, visit change 30761. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib5def2ae3c79f408f2ee0bb4c20fba1437d30c64
Gerrit-Change-Number: 30761
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-CC: osmith <osmith@sysmocom.de>
Gerrit-MessageType: merged