[BugFix][L805A-29]Solve wait subcard incomming call failed
Only Configure:No
Affected branch:DSDS
Affected module:CALL
Is it affected on both ZXIC and MTK: MTK
Self-test: Yes
Doc Update:No
Change-Id: I7881951b8131c0ee63d32454d8be2d5951bc62c3
diff --git a/common_src/lib/liblynq-call/lynq_call.cpp b/common_src/lib/liblynq-call/lynq_call.cpp
index d4d57d2..292c4fe 100755
--- a/common_src/lib/liblynq-call/lynq_call.cpp
+++ b/common_src/lib/liblynq-call/lynq_call.cpp
@@ -92,6 +92,7 @@
#ifdef MODE_DSDS
int global_slot = -1;
+int urc_slot = -1;
#endif
@@ -1044,6 +1045,10 @@
LYERRLOG("%s module state %d error",__func__,g_module_init_flag);
return LYNQ_E_CONFLICT;
}
+
+#ifdef MODE_DSDS
+ urc_slot = -1;
+#endif
try_reset_audio_service();
#ifdef GSW_RIL_CFG
@@ -1645,6 +1650,9 @@
p->readInt32(&resp_type);
p->readInt32(&urcid);
p->readInt32(&slot_id);
+#ifdef MODE_DSDS
+ urc_slot = slot_id;
+#endif
LYINFLOG("%s urc id = %d, slot_id = %d, size is %d, msg is %s",__func__, urcid,slot_id,size,requestToString(urcid));
switch (urcid)
{
diff --git a/common_src/lib/liblynq-call/lynq_module_socket.cpp b/common_src/lib/liblynq-call/lynq_module_socket.cpp
index cd63b0c..5408f54 100755
--- a/common_src/lib/liblynq-call/lynq_module_socket.cpp
+++ b/common_src/lib/liblynq-call/lynq_module_socket.cpp
@@ -30,6 +30,14 @@
#define USER_LOG_TAG "LYNQ_NETWORK"
+#ifdef MODE_DSDS
+#define SLOT_1 1
+#define SLOT_0 0
+#define DEFAULT_SLOT_0 '0'
+#define DEFAULT_SLOT_1 '1'
+#define DEFAULT_SLOT_STATUS '1'
+#endif
+
typedef struct{
int uToken;
int request;
@@ -37,6 +45,17 @@
char param[LYNQ_REQUEST_PARAM_BUF];
}lynq_client_t;
+#ifdef MODE_DSDS
+typedef struct{
+ int uToken;
+ int request;
+ int paramLen;
+ char param[LYNQ_REQUEST_PARAM_BUF];
+ char slot_status;
+ char slot;
+}lynq_client_dsds_t;
+#endif
+
typedef struct{
int resp_type;
int token;
@@ -101,6 +120,7 @@
#ifdef MODE_DSDS
extern int global_slot;
+extern int urc_slot;
#endif
/**@brief just for inner test
@@ -238,7 +258,28 @@
*/
int lynq_send_common_request(Parcel*& p, int time_out, int request_id, int argc, const char* format,...)
{
+
+#ifdef MODE_DSDS
+ lynq_client_dsds_t client;
+ client.slot_status = DEFAULT_SLOT_STATUS;
+
+ if(urc_slot == SLOT_1)
+ {
+ client.slot = DEFAULT_SLOT_1;
+ }
+ else if(urc_slot == SLOT_0)
+ {
+ client.slot = DEFAULT_SLOT_0;
+ }
+ else
+ {
+ client.slot = ' ';
+ }
+
+#else
lynq_client_t client;
+#endif
+
int ret;
int send_num;
@@ -254,7 +295,13 @@
vsnprintf(client.param, LYNQ_REQUEST_PARAM_BUF, format, args);
va_end(args);
}
+#ifdef MODE_DSDS
+
+ LYINFLOG("uToken=%d,request=%d,paralen=%d,param=%s,slot_status=%c,slot=%c",client.uToken,client.request,client.paramLen,client.param,client.slot_status,client.slot);
+#else
LYINFLOG("uToken=%d,request=%d,paralen=%d,param=%s",client.uToken,client.request,client.paramLen,client.param);
+#endif
+
pthread_mutex_lock(&s_sendto_mutex);
if(s_inner_test==1)
{