diff options
author | Brandon Bayer <bbayer@multitech.com> | 2015-11-11 09:38:14 -0600 |
---|---|---|
committer | Brandon Bayer <bbayer@multitech.com> | 2015-11-11 09:38:14 -0600 |
commit | 1909e423e48929690e5b44e2860e8ded4ee997af (patch) | |
tree | 44bf016c706e0e83bb761b4a63dfab4d79fbd6df | |
parent | be01eb8a87f1582b1c15ec4e09a9a66770da87c5 (diff) | |
download | sms-utils-1909e423e48929690e5b44e2860e8ded4ee997af.tar.gz sms-utils-1909e423e48929690e5b44e2860e8ded4ee997af.tar.bz2 sms-utils-1909e423e48929690e5b44e2860e8ded4ee997af.zip |
add support for CDMA style 8-bit decoding0.0.9
-rw-r--r-- | src/pdu.h | 1 | ||||
-rw-r--r-- | src/pdu_decode.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -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) { |