From 78cac8472f8f4ff6c43fa9e81884bf91e06df1ad Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 4 Nov 2010 11:09:11 -0500 Subject: smsutil: Use entire range of ref / port addresses --- src/smsutil.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/smsutil.c') diff --git a/src/smsutil.c b/src/smsutil.c index c5be468a..3ec1e751 100644 --- a/src/smsutil.c +++ b/src/smsutil.c @@ -3176,18 +3176,18 @@ GSList *sms_datagram_prepare(const char *to, template.submit.ud[0] += 6; template.submit.ud[offset] = SMS_IEI_APPLICATION_ADDRESS_16BIT; template.submit.ud[offset + 1] = 4; - template.submit.ud[offset + 2] = (dst & 0xf0) >> 8; - template.submit.ud[offset + 3] = dst & 0xf; - template.submit.ud[offset + 4] = (src & 0xf0) >> 8; - template.submit.ud[offset + 5] = src & 0xf; + template.submit.ud[offset + 2] = (dst & 0xff00) >> 8; + template.submit.ud[offset + 3] = dst & 0xff; + template.submit.ud[offset + 4] = (src & 0xff00) >> 8; + template.submit.ud[offset + 5] = src & 0xff; offset += 6; } else { template.submit.ud[0] += 4; template.submit.ud[offset] = SMS_IEI_APPLICATION_ADDRESS_8BIT; template.submit.ud[offset + 1] = 2; - template.submit.ud[offset + 2] = dst & 0xf; - template.submit.ud[offset + 3] = src & 0xf; + template.submit.ud[offset + 2] = dst & 0xff; + template.submit.ud[offset + 3] = src & 0xff; offset += 4; } @@ -3203,15 +3203,15 @@ GSList *sms_datagram_prepare(const char *to, template.submit.ud[0] += 6; template.submit.ud[offset] = SMS_IEI_CONCATENATED_16BIT; template.submit.ud[offset + 1] = 4; - template.submit.ud[offset + 2] = (ref & 0xf0) >> 8; - template.submit.ud[offset + 3] = ref & 0xf; + template.submit.ud[offset + 2] = (ref & 0xff00) >> 8; + template.submit.ud[offset + 3] = ref & 0xff; offset += 6; } else { template.submit.ud[0] += 5; template.submit.ud[offset] = SMS_IEI_CONCATENATED_8BIT; template.submit.ud[offset + 1] = 3; - template.submit.ud[offset + 2] = ref & 0xf; + template.submit.ud[offset + 2] = ref & 0xff; offset += 5; } @@ -3342,15 +3342,15 @@ GSList *sms_text_prepare(const char *to, const char *utf8, guint16 ref, template.submit.ud[0] += 6; template.submit.ud[offset] = SMS_IEI_CONCATENATED_16BIT; template.submit.ud[offset + 1] = 4; - template.submit.ud[offset + 2] = (ref & 0xf0) >> 8; - template.submit.ud[offset + 3] = ref & 0xf; + template.submit.ud[offset + 2] = (ref & 0xff00) >> 8; + template.submit.ud[offset + 3] = ref & 0xff; offset += 6; } else { template.submit.ud[0] += 5; template.submit.ud[offset] = SMS_IEI_CONCATENATED_8BIT; template.submit.ud[offset + 1] = 3; - template.submit.ud[offset + 2] = ref & 0xf; + template.submit.ud[offset + 2] = ref & 0xff; offset += 5; } -- cgit v1.2.3