[Bugfix][T108-GSW][bug-view-1462]if no voice init, call gsw_voice_set_speaker_volume will segment fault.
Only Configure: No
Affected branch: unknown
Affected module: network
Is it affected on both ZXIC and ASR: only ASR
Self-test: yes
Doc Update: no
Change-Id: If303e6764dad9d71e2f46ebde07da1156ad44f52
diff --git a/mbtk/test/libgsw_lib/gsw_voice_test.c b/mbtk/test/libgsw_lib/gsw_voice_test.c
index 366b58a..28098c2 100755
--- a/mbtk/test/libgsw_lib/gsw_voice_test.c
+++ b/mbtk/test/libgsw_lib/gsw_voice_test.c
@@ -274,7 +274,7 @@
ret = gsw_voice_sdk_init(gsw_test_callback);
if(ret != 0)
{
- printf("gsw_voice_sdk_init fail\n");
+ printf("gsw_voice_sdk_init fail, ret is %d\n",ret);
}
else
{
@@ -293,7 +293,7 @@
ret = gsw_voice_normal_voice_start(&call_handle, number);
if(ret < 0)
{
- printf("gsw_voice_normal_voice_start fail\n");
+ printf("gsw_voice_normal_voice_start fail, ret is %d\n", ret);
}
else
{
@@ -308,7 +308,7 @@
ret = gsw_voice_hangup(call_handle);
if(ret < 0)
{
- printf("gsw_voice_hangup fail\n");
+ printf("gsw_voice_hangup fail, ret is %d\n",ret);
}
else
{
@@ -345,7 +345,7 @@
ret = gsw_voice_set_auto_answer_mode(mode);
if(ret < 0)
{
- printf("gsw_voice_set_auto_answer_mode fail\n");
+ printf("gsw_voice_set_auto_answer_mode fail, ret is %d\n",ret);
}
else
{
@@ -368,7 +368,7 @@
ret = gsw_voice_set_speaker_volume(volume);
if(ret < 0)
{
- printf("gsw_voice_set_speaker_volume fail\n");
+ printf("gsw_voice_set_speaker_volume fail, ret is %d\n",ret);
}
else
{
@@ -391,7 +391,7 @@
ret = gsw_voice_set_audio_mode(mode);
if(ret != 0)
{
- printf("gsw_voice_set_audio_mode fail\n");
+ printf("gsw_voice_set_audio_mode fail, ret is %d\n",ret);
}
else
{
@@ -414,7 +414,7 @@
ret = gsw_voice_set_remote_rtp_ip(remote_ip_addr,strlen(remote_ip_addr)+1);
if(ret != 0)
{
- printf("gsw_voice_set_remote_rtp_ip fail\n");
+ printf("gsw_voice_set_remote_rtp_ip fail, ret is %d\n",ret);
}
else
{
@@ -442,7 +442,7 @@
ret = gsw_voice_set_rtp_port(mode,port);
if(ret != 0)
{
- printf("gsw_voice_set_rtp_port fail\n");
+ printf("gsw_voice_set_rtp_port fail, ret is %d\n",ret);
}
else
{
@@ -473,7 +473,7 @@
ret = gsw_voice_set_rtp_param(clockRate, channel, latency);
if(ret != 0)
{
- printf("gsw_voice_set_rtp_param fail\n");
+ printf("gsw_voice_set_rtp_param fail, ret is %d\n",ret);
}
else
{
@@ -495,7 +495,7 @@
ret = gsw_voice_set_rtp_vlan_info(interface);
if(ret != 0)
{
- printf("gsw_voice_set_rtp_vlan_info fail\n");
+ printf("gsw_voice_set_rtp_vlan_info fail, ret is %d\n",ret);
}
else
{