diff options
-rw-r--r-- | include/gsmd/usock.h | 8 | ||||
-rw-r--r-- | src/gsmd/sms_pdu.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 6200118..2072b54 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -196,15 +196,15 @@ enum gsmd_msg_sms_fmt { enum { MESSAGE_CLASS_CLASS0 = 0x00, MESSAGE_CLASS_CLASS1 = 0x01, - MESSAGE_CLASS_CLASS2 = 0x10, - MESSAGE_CLASS_CLASS3 = 0x11, + MESSAGE_CLASS_CLASS2 = 0x02, + MESSAGE_CLASS_CLASS3 = 0x03, }; enum gsmd_sms_alphabet { ALPHABET_DEFAULT = (0x00<<2), ALPHABET_8BIT = (0x01<<2), - ALPHABET_UCS2 = (0x10<<2), - ALPHABET_RESERVED = (0x11<<2), + ALPHABET_UCS2 = (0x02<<2), + ALPHABET_RESERVED = (0x03<<2), }; /* bit 1 & bit0 */ diff --git a/src/gsmd/sms_pdu.c b/src/gsmd/sms_pdu.c index 3d88663..b5774d8 100644 --- a/src/gsmd/sms_pdu.c +++ b/src/gsmd/sms_pdu.c @@ -46,7 +46,7 @@ static int sms_data_bytelen(u_int8_t data_coding_scheme, u_int8_t len) case ALPHABET_8BIT: return len; case ALPHABET_UCS2: - return len * 2; + return len; } return 0; } |