[Bugfix][T108][bug-view-2122]Fix the issue of not receiving 8-bit long short-messages
Only Configure: No
Affected branch: mbtk_source_ds
Affected module: sms
Is it affected on IC: only ASR
Self-test: yes
Doc Update: no
Change-Id: I6a5750dafc4dc357e3b34905544b37c9c07497f4
diff --git a/mbtk/libmbtk_lib/ril/mbtk_pdu_sms.c b/mbtk/libmbtk_lib/ril/mbtk_pdu_sms.c
index 20cf88e..f245f5a 100755
--- a/mbtk/libmbtk_lib/ril/mbtk_pdu_sms.c
+++ b/mbtk/libmbtk_lib/ril/mbtk_pdu_sms.c
@@ -2442,7 +2442,7 @@
}
ptr += ret;
LOGE("SMSC = [%s]\n", smsc);
-
+
/* Protocol Data Unit Type(PDU Type) */
{
kal_int32 pdu_type = internal_mdapi_hex2int(ptr);
@@ -2579,7 +2579,7 @@
}
/*lei modify for gsw 2022/5/12*/
sms->total_pack = internal_mdapi_hex2int(ptr);
- LOGE("sms->total_pack = [%d]", sms->curr_pack);
+ LOGE("sms->total_pack = [%d]", sms->total_pack);
*total_pack = sms->total_pack;
sms->curr_pack = internal_mdapi_hex2int(ptr+2);
LOGE("sms->curr_pack = [%d]", sms->curr_pack);
@@ -2616,7 +2616,9 @@
kal_int32 utf8_len = 0;
kal_uint8* binary_data = NULL;
kal_char* utf8_buffer = NULL;
-
+ if (sms->curr_pack != 0)
+ data_len -= (udh_len + 1);
+ LOGE("leng:%d\n",data_len);
// 分配二进制缓冲区
binary_data = malloc(data_len);
if (!binary_data) {
@@ -2674,8 +2676,8 @@
free(binary_data);
free(utf8_buffer);
- LOGE("8bit msg decoded: len=%d, content=%.*s",
- copy_size, copy_size > 50 ? 50 : copy_size, sms->msg_content);
+ LOGE("8bit msg decoded: len=%d, content=%s",
+ copy_size, sms->msg_content);
break;
case MDAPI_SMS_CHARSET_UCS2:
@@ -2760,6 +2762,7 @@
return status;
}
+
void ArrayToStr(unsigned char *Buff, unsigned int BuffLen, char *OutputStr)
{
int i = 0;