Change in osmo-pcu[master]: csn1: Update M_NULL CSN_DESCR to match wireshark

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/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Jan 28 21:34:41 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16994 )

Change subject: csn1: Update M_NULL CSN_DESCR to match wireshark
......................................................................

csn1: Update M_NULL CSN_DESCR to match wireshark

Port from iwireshark.git commit cc6d4341e65ef2e8d8488fe0ac0f236ece0dd844.
It looks like it makes no difference to us now, but other EGPRS messages
may use it in the future.

Ported-by: Pau Espin Pedrol <pespin at sysmocom.de>
Change-Id: I34039370c292e62790a38abb59f55c69fffa88e8
---
M src/csn1.cpp
M src/csn1.h
M src/gsm_rlcmac.cpp
3 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/csn1.cpp b/src/csn1.cpp
index 6203a44..9ddb9c1 100644
--- a/src/csn1.cpp
+++ b/src/csn1.cpp
@@ -190,6 +190,7 @@
 
       case CSN_NULL:
       { /* Empty member! */
+        bit_offset += pDescr->i;
         pDescr++;
         break;
       }
@@ -631,6 +632,7 @@
 
           case CSN_NULL:
           { /* Empty member! */
+            bit_offset += pDescr->i;
             pDescr++;
             break;
           }
diff --git a/src/csn1.h b/src/csn1.h
index 1015e69..39e6625 100644
--- a/src/csn1.h
+++ b/src/csn1.h
@@ -592,8 +592,8 @@
 #define M_PADDING_BITS(_STRUCT)\
         {CSN_PADDING_BITS, 0, {0}, 0, TRUE, "Padding", {(StreamSerializeFcn_t)0}}
 
-#define M_NULL(_STRUCT, _MEMBER)\
-        {CSN_NULL, 0, {0}, offsetof(_STRUCT, _MEMBER), FALSE, #_MEMBER, {(StreamSerializeFcn_t)0}}
+#define M_NULL(_STRUCT, _MEMBER, _SKIP_BITS)\
+        {CSN_NULL, _SKIP_BITS, {0}, offsetof(_STRUCT, _MEMBER), FALSE, #_MEMBER, {(StreamSerializeFcn_t)0}}
 
 #define M_THIS_EXIST(_STRUCT)\
         {CSN_EXIST, 0, {0}, offsetof(_STRUCT, Exist), FALSE, "Exist", {(StreamSerializeFcn_t)0}}
diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp
index 339279c..c1d3b97 100644
--- a/src/gsm_rlcmac.cpp
+++ b/src/gsm_rlcmac.cpp
@@ -605,7 +605,7 @@
 static const
 CSN_ChoiceElement_t SI13_PBCCH_Description_Channel[] =
 {/* this one is used in SI13*/
-  {2, 0x00 , M_NULL(PBCCH_Description_t, u.dummy)},/*Default to BCCH carrier*/
+  {2, 0x00 , M_NULL(PBCCH_Description_t, u.dummy, 0)},/*Default to BCCH carrier*/
   {2, 0x01 , M_UINT(PBCCH_Description_t, u.ARFCN, 10)},
   {1, 0x01 , M_UINT(PBCCH_Description_t, u.MAIO, 6)},
 };
@@ -3064,7 +3064,7 @@
 
 static const
 CSN_DESCR_BEGIN        (Delete_All_Stored_Individual_Priorities_t)
-  M_NULL               (Delete_All_Stored_Individual_Priorities_t, dummy),
+  M_NULL               (Delete_All_Stored_Individual_Priorities_t, dummy, 0),
 CSN_DESCR_END          (Delete_All_Stored_Individual_Priorities_t)
 
 static const

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16994
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I34039370c292e62790a38abb59f55c69fffa88e8
Gerrit-Change-Number: 16994
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200128/840754f7/attachment.htm>


More information about the gerrit-log mailing list