[Bugfix][T106BUG-679] Two call,one call status change no callback
Only Configure: Yes
Affected branch: master
Affected module: version
Is it affected on both ZXIC and MTK:only ZXIC
Self-test: Yes
Doc Update:No
Change-Id: Iee00c4252d7820175d249b7c81537ed1c41a1f7b
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
index 404acb7..05550f1 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
@@ -91,6 +91,7 @@
static int s_module_call_state =CALL_OFF;
static int s_call_auto_answer = 0;
+static char g_hungup_addr[LYNQ_PHONE_NUMBER_MAX] = {0};
typedef enum{
LYNQ_E_VOLUMN_SET_DTMF,
@@ -308,6 +309,7 @@
s_call_lists[lynq_call_id].toa = 0;
s_call_lists[lynq_call_id].direction = 0;
s_call_lists[lynq_call_id].used = 0;
+ memcpy(g_hungup_addr,s_call_lists[lynq_call_id].addr,strlen(s_call_lists[lynq_call_id].addr)+1);
memset(s_call_lists[lynq_call_id].addr,0,sizeof(s_call_lists[lynq_call_id].addr));
}
@@ -468,6 +470,9 @@
if(call_end == 0)
{
LYINFLOG("MT/MO hungup,then clean call info local idx is %d id is %d",i, s_call_lists[i].call_id);
+
+ s_CallId = s_call_lists[i].call_id;
+
//update_end_state(i);//lei modify for:update end state for this call
cleanCallList(i);
send_call_state_change();//means mt/mo call is end
@@ -538,6 +543,7 @@
LYINFLOG("state changed from %d to %d",s_call_lists[n].call_state,call_list[i].call_state);
updateCallList(&s_call_lists[n],call_list[i].call_id,call_list[i].call_state,call_list[i].toa,call_list[i].direction);//update mt call
+ s_CallId = call_list[i].call_id;
send_call_state_change();
}
}
@@ -1032,8 +1038,11 @@
if(lynq_call_id!=INVALID_ID)
{
cleanCallList(lynq_call_id);
- }
-
+ }
+
+
+ s_CallId = call_id;
+
//fix bug T106BUG-56
send_call_state_change();
return RESULT_OK;
@@ -1114,6 +1123,7 @@
if((*handle) >= 0)
{
*call_state = (int)LYNQ_CALL_END;
+ memcpy(addr,g_hungup_addr,strlen(g_hungup_addr)+1);
return RESULT_OK;
}
else