RLCMAC: enc__RlcmacUlDataBlock: fix 'omit' for PFI / TLLI

It's not sufficient to check if the value is bound; we must also make
sure that the value is not OMIT.
This commit is contained in:
Harald Welte 2017-07-31 18:33:35 +02:00
parent 78a1af6782
commit 2072ab6698
1 changed files with 2 additions and 2 deletions

View File

@ -113,8 +113,8 @@ OCTETSTRING enc__RlcmacUlDataBlock(const RlcmacUlDataBlock& si)
in.mac__hdr().e() = false;
/* Fix other presence indications */
in.mac__hdr().tlli__ind() = in.tlli().is_bound();
in.mac__hdr().pfi__ind() = in.pfi().is_bound();
in.mac__hdr().tlli__ind() = in.tlli().is_bound() && in.tlli() != OMIT_VALUE;
in.mac__hdr().pfi__ind() = in.pfi().is_bound() && in.pfi() != OMIT_VALUE;
/* use automatic/generated decoder for header */
in.mac__hdr().encode(UlMacDataHeader_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW);