From 1909e423e48929690e5b44e2860e8ded4ee997af Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Wed, 11 Nov 2015 09:38:14 -0600 Subject: add support for CDMA style 8-bit decoding --- src/pdu.h | 1 + src/pdu_decode.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pdu.h b/src/pdu.h index 5f47e5e..58f88e0 100644 --- a/src/pdu.h +++ b/src/pdu.h @@ -49,6 +49,7 @@ enum { PDU_ALPHABET_DEFAULT = 0, //7-bit PDU_ALPHABET_CDMA_DEFAULT = 2, //7-bit PDU_ALPHABET_EIGHT = 4, + PDU_ALPHABET_CDMA_EIGHT = 8, }; struct pdu_info { diff --git a/src/pdu_decode.c b/src/pdu_decode.c index 2b9e44c..140fd14 100644 --- a/src/pdu_decode.c +++ b/src/pdu_decode.c @@ -230,7 +230,8 @@ int pdu_decode_user_data(const char *pdu_str, struct pdu_info *pdu, int *nr_octe *nr_octets = pdu->user_data_len; pdu->user_data_len = octet_align_cdma(pdu->user_data_len); } - } else if (pdu->data_coding.general.alphabet == PDU_ALPHABET_EIGHT) { + } else if ((pdu->data_coding.general.alphabet == PDU_ALPHABET_EIGHT) || + (pdu->data_coding.general.alphabet == PDU_ALPHABET_CDMA_EIGHT)) { log_debug("data coding alphabet is eight"); if (pdu->user_data_len > PDU_UD_8BIT_MAX) { -- cgit v1.2.3