[Bugfix][T800][task-view-311] lynq_get_urc_info: when get signal
strength, not fill slot id

    Only Configure: No
    Affected branch: unknown
    Affected module: network
    Is it affected on both ZXIC and MTK: both
    Self-test: yes
    Doc Update: no

Change-Id: If8d175c18107d742163946493648355bb6e1c0ad
diff --git a/common_src/lib/liblynq-network/lynq_network.cpp b/common_src/lib/liblynq-network/lynq_network.cpp
index 7b3f79e..bf5f29d 100755
--- a/common_src/lib/liblynq-network/lynq_network.cpp
+++ b/common_src/lib/liblynq-network/lynq_network.cpp
@@ -28,6 +28,9 @@
 /*For T800-API-1475, cfun 0 need 7s */

 #define WAIT_TIME_LENGTH_FOR_RADIO_ON (65) 

 

+#define WAIT_TIME_LENGTH_FOR_QUERY_AVAILABLE_NETWORK (600) 

+#define WAIT_TIME_LENGTH_FOR_SET_IMS (65) 

+

 #define SET_SBP_OPEN    " AT+ESBP=5,\"SBP_NRRC_BAR_CELL_WITH_CONNECTION_FAILURE\",1 "

 #define SET_SBP_CLOSE   " AT+ESBP=5,\"SBP_NRRC_BAR_CELL_WITH_CONNECTION_FAILURE\",0 "

 #define QUERY_SBP_STATUS    "AT+ESBP=7,\"SBP_NRRC_BAR_CELL_WITH_CONNECTION_FAILURE\""

@@ -419,7 +422,7 @@
     }  

 

     Parcel* p=NULL;

-    int ret=lynq_send_common_request(p,600,RIL_REQUEST_QUERY_AVAILABLE_NETWORKS,0,"");

+    int ret=lynq_send_common_request(p,WAIT_TIME_LENGTH_FOR_QUERY_AVAILABLE_NETWORK,RIL_REQUEST_QUERY_AVAILABLE_NETWORKS,0,"");

 

     if(ret!=RESULT_OK)

     {

@@ -1184,7 +1187,7 @@
     }     

 

     Parcel* p=NULL;

-    int ret = lynq_send_common_request(p,65,RIL_REQUEST_SET_IMS_ENABLE,1,"%d",ims_mode);

+    int ret = lynq_send_common_request(p,WAIT_TIME_LENGTH_FOR_SET_IMS,RIL_REQUEST_SET_IMS_ENABLE,1,"%d",ims_mode);

     if(ret!=RESULT_OK)

     {

         LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);

@@ -1204,48 +1207,45 @@
         LYERRLOG("%s module state %d error",__func__,g_module_init_flag);

         return LYNQ_E_CONFLICT;

     }

-    LYDBGLOG("start get urc info");

+    LYINFLOG("get urc info, handle is %d, slot is %d",handle,s_module_urc_slot_id);

     if(is_support_urc(handle)==false)

     {

-        LYINFLOG("invalid handle!!!");

+        LYERRLOG("not support handle!!!");

         return LYNQ_E_PARAMETER_ANONALY;

     }

     if((handle ==RIL_UNSOL_SIGNAL_STRENGTH && NULL == solSigStren) || 

         (handle !=RIL_UNSOL_SIGNAL_STRENGTH && NULL == slot_id))

     {

-        LYINFLOG("incoming solSigStren or slot_id is NULL!!!");

+        LYERRLOG("solSigStren or slot_id is NULL!!!");

         return LYNQ_E_PARAMETER_ANONALY;

+    }  

+

+    if(slot_id!=NULL)

+    {

+        *slot_id = s_module_urc_slot_id;

     }

-    switch(handle)

-    {        

-        case RIL_UNSOL_SIGNAL_STRENGTH: //1009

-        {

-            LYDBGLOG("get state update to signal info");

-            solSigStren->gw_sig_valid = s_network_urc_solSigStren.gw_sig_valid;

-            solSigStren->rssi = s_network_urc_solSigStren.rssi;

-            solSigStren->wcdma_signalstrength = s_network_urc_solSigStren.wcdma_signalstrength;

-            solSigStren->wcdma_sig_valid = s_network_urc_solSigStren.wcdma_sig_valid;

-            solSigStren->rscp = s_network_urc_solSigStren.rscp;

-            solSigStren->ecno = s_network_urc_solSigStren.ecno;

-            solSigStren->lte_signalstrength = s_network_urc_solSigStren.lte_signalstrength;

-            solSigStren->lte_sig_valid = s_network_urc_solSigStren.lte_sig_valid;

-            solSigStren->rsrp = s_network_urc_solSigStren.rsrp;

-            solSigStren->rsrq = s_network_urc_solSigStren.rsrq;

-            solSigStren->rssnr = s_network_urc_solSigStren.rssnr;

-            solSigStren->nr_sig_valid = s_network_urc_solSigStren.nr_sig_valid;

-            solSigStren->ssRsrp = s_network_urc_solSigStren.ssRsrp;

-            solSigStren->ssRsrq = s_network_urc_solSigStren.ssRsrq;

-            solSigStren->ssSinr = s_network_urc_solSigStren.ssSinr;

-            solSigStren->csiRsrp = s_network_urc_solSigStren.csiRsrp;

-            solSigStren->csiRsrq = s_network_urc_solSigStren.csiRsrq;

-            solSigStren->csiSinr = s_network_urc_solSigStren.csiSinr;

-            break;

-        }

-        default:

-        {

-            *slot_id = s_module_urc_slot_id;

-            LYINFLOG("slot_id = %d",s_module_urc_slot_id);

-		}

+  

+    if(handle==RIL_UNSOL_SIGNAL_STRENGTH)

+    {

+        LYDBGLOG("get state update to signal info");

+        solSigStren->gw_sig_valid = s_network_urc_solSigStren.gw_sig_valid;

+        solSigStren->rssi = s_network_urc_solSigStren.rssi;

+        solSigStren->wcdma_signalstrength = s_network_urc_solSigStren.wcdma_signalstrength;

+        solSigStren->wcdma_sig_valid = s_network_urc_solSigStren.wcdma_sig_valid;

+        solSigStren->rscp = s_network_urc_solSigStren.rscp;

+        solSigStren->ecno = s_network_urc_solSigStren.ecno;

+        solSigStren->lte_signalstrength = s_network_urc_solSigStren.lte_signalstrength;

+        solSigStren->lte_sig_valid = s_network_urc_solSigStren.lte_sig_valid;

+        solSigStren->rsrp = s_network_urc_solSigStren.rsrp;

+        solSigStren->rsrq = s_network_urc_solSigStren.rsrq;

+        solSigStren->rssnr = s_network_urc_solSigStren.rssnr;

+        solSigStren->nr_sig_valid = s_network_urc_solSigStren.nr_sig_valid;

+        solSigStren->ssRsrp = s_network_urc_solSigStren.ssRsrp;

+        solSigStren->ssRsrq = s_network_urc_solSigStren.ssRsrq;

+        solSigStren->ssSinr = s_network_urc_solSigStren.ssSinr;

+        solSigStren->csiRsrp = s_network_urc_solSigStren.csiRsrp;

+        solSigStren->csiRsrq = s_network_urc_solSigStren.csiRsrq;

+        solSigStren->csiSinr = s_network_urc_solSigStren.csiSinr;

     }        

     return RESULT_OK;   

 }