Change in osmo-pcu[master]: csn1: fix: do not return 0 if no bits left in the buffer

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Sat Mar 7 10:02:42 UTC 2020


Hello pespin, Jenkins Builder, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/osmo-pcu/+/17394

to look at the new patch set (#4).

Change subject: csn1: fix: do not return 0 if no bits left in the buffer
......................................................................

csn1: fix: do not return 0 if no bits left in the buffer

Both csnStreamDecoder() and csnStreamEncoder() shall not return 0
prematurely if no more bits left in the input / output bit-vector.

Returning CSN_ERROR_NEED_MORE_BITS_TO_UNPACK might make more sense,
however we don't know in advance (i.e. without entering the loop)
whether it's an error or not. Some CSN.1 definitions have names
like 'M_*_OR_NULL', what basically means that they're optional
and can be ignored or omitted.

Most of the case statements do check whether the number of remaining
bits is enough to unpack / pack a value, so let's leave it up to
the the current CSN_* handler (pointed by pDescr).

Change-Id: Ie3a15e210624599e39b1e70c8d34efc10c552f6c
---
M src/csn1.c
M tests/rlcmac/RLCMACTest.err
M tests/rlcmac/RLCMACTest.ok
3 files changed, 3 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/94/17394/4
-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17394
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie3a15e210624599e39b1e70c8d34efc10c552f6c
Gerrit-Change-Number: 17394
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200307/c82edf2a/attachment.htm>


More information about the gerrit-log mailing list