FreeCalypso > hg > freecalypso-tools
diff uptools/sms-pdu-decode/pdu-common.c @ 599:18bfc10ba20e
sms-pdu-decode: more prep for pcm-sms-decode addition
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 08 Feb 2020 01:20:45 +0000 |
parents | 9f7a263ad7f0 |
children | 8dc93aac9a9c |
line wrap: on
line diff
--- a/uptools/sms-pdu-decode/pdu-common.c Sat Feb 08 00:48:28 2020 +0000 +++ b/uptools/sms-pdu-decode/pdu-common.c Sat Feb 08 01:20:45 2020 +0000 @@ -248,7 +248,7 @@ return(rc); } -process_pdu() +process_pdu(require_exact_length) { unsigned udl, udl_octets; unsigned udhl, udh_octets, udh_chars, ud_chars; @@ -299,7 +299,7 @@ } udl_octets = udl; } - if (pdu_length - pdu_ptr != udl_octets) { + if (require_exact_length && pdu_length - pdu_ptr != udl_octets) { printf("Decode-Error: UD length in PDU %u != expected %u\n", pdu_length - pdu_ptr, udl_octets); return(-1);