aboutsummaryrefslogtreecommitdiffstats
path: root/tests/rlcmac/RLCMACTest.ok
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-03-06 08:53:36 +0700
committerfixeria <axilirator@gmail.com>2020-03-11 19:55:55 +0000
commit29aeb901e47b39e8e5629eb5108b3f846393b745 (patch)
tree3a01838d750526156939c5ec0ee189f52ba93b81 /tests/rlcmac/RLCMACTest.ok
parent773cb74ec8d4f0236e59bba0912b60d0f485af9a (diff)
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 current CSN_* handler (pointed by pDescr) if no bits left. Return CSN_ERROR_NEED_MORE_BITS_TO_UNPACK only if the number of remaining bits is negative as this is an error in any case. Change-Id: Ie3a15e210624599e39b1e70c8d34efc10c552f6c
Diffstat (limited to 'tests/rlcmac/RLCMACTest.ok')
-rw-r--r--tests/rlcmac/RLCMACTest.ok2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok
index 27ce8795..89e07ecd 100644
--- a/tests/rlcmac/RLCMACTest.ok
+++ b/tests/rlcmac/RLCMACTest.ok
@@ -102,7 +102,7 @@ vector1 = 4016713dc094270ca2ae57ef909006aa0fc0001f80222b
=========Start DECODE===========
+++++++++Finish DECODE (0)++++++++++
=========Start ENCODE=============
-+++++++++Finish ENCODE (0)+++++++++++
++++++++++Finish ENCODE (-5)+++++++++++
vector1 = 40 16 71 3d c0 94 27 0c a2 ae 57 ef 90 90 06 aa 0f c0 00 1f 80 22 2b
vector2 = 40 16 71 3d c0 94 27 48 a2 ae 57 ef 90 90 06 aa 00 00 1f 80 00 3f 00
vector1 == vector2 : FALSE