[PATCH] osmo-pcu[master]: decoding: improve and add comments

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue May 31 11:25:37 UTC 2016


Review at  https://gerrit.osmocom.org/139

decoding: improve and add comments

Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d
---
M src/decoding.cpp
M src/decoding.h
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/139/1

diff --git a/src/decoding.cpp b/src/decoding.cpp
index 0c81b2a..5f64ac0 100644
--- a/src/decoding.cpp
+++ b/src/decoding.cpp
@@ -32,7 +32,7 @@
 #include <string.h>
 
 #define LENGTH_TO_END 255
-/*
+/*!
  * \returns num extensions fields (num frames == offset) on success,
  *          -errno otherwise.
  */
@@ -197,6 +197,7 @@
 	e = rdbi->e;
 	if (e) {
 		if (chunks_size > 0) {
+			/* Block without LI means it only contains data of one LLC PDU */
 			chunks[num_chunks].offset = offs;
 			chunks[num_chunks].length = LENGTH_TO_END;
 			chunks[num_chunks].is_complete = is_last_block;
diff --git a/src/decoding.h b/src/decoding.h
index 1043d67..50c9e7d 100644
--- a/src/decoding.h
+++ b/src/decoding.h
@@ -28,10 +28,11 @@
 
 class Decoding {
 public:
+	/* represents (parts) LLC PDUs within one RLC Data block */
 	struct RlcData {
 		uint8_t	offset;
 		uint8_t	length;
-		bool	is_complete;
+		bool	is_complete; /* if this PDU ends in this block */
 	};
 
 	static int rlc_data_from_ul_data(

-- 
To view, visit https://gerrit.osmocom.org/139
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>



More information about the OpenBSC mailing list