[Bugfix][T106][task-view-165] after set testnumber to empty string, dial
normal call fail, lynq-ril-service crash
Only Configure: No
Affected branch: unknown
Affected module: ecall
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: yes
Doc Update: no
Change-Id: Ibc61dfee8a17bc57cbdec7adffc6715e427c5b35
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
index 41c5c97..1bfc7c2 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
@@ -349,8 +349,12 @@
case 7:
{
char PhoneNum[32] = {0};
- printf("please input test phone number: \n");
- scanf("%s", PhoneNum);
+ printf("please input test phone number(input null means \"\"): \n");
+ scanf("%s", PhoneNum);
+ if(0 == strcmp(PhoneNum, "null"))
+ {
+ PhoneNum[0]='\0';
+ }
ret = qser_voice_set_test_num(&h_voice, E_QSER_VOICE_ECALL_SET_NUMBER, PhoneNum, strlen(PhoneNum)+1);
printf("qser_voice_set_test_num ret = %d\n", ret);
break;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
index 1c8934a..1763151 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
@@ -906,7 +906,7 @@
}
ecalltestnum = (RIL_ECallNumSet *)data;
- if (NULL != ecalltestnum->address) {
+ if (2 == ecalltestnum->arg_num && NULL != ecalltestnum->address) { //modify by hq @20240903 for bug 165
free(ecalltestnum->address);
}