[Optimize][T8TSK-76][System]Run temporal to check whether the RIL service is abnormal

Change-Id: I597206f2ba9343b3bb93af72b57cd39d48dcce2f
diff --git a/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp b/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp
index 2509613..bf33480 100755
--- a/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp
+++ b/framework/lynq-sdk-ready/src/timer/lynq_timer.cpp
@@ -16,7 +16,7 @@
 

 #define DEST_PORT 8088

 #define DSET_IP_ADDRESS  "127.0.0.1"

-#define RIL_REQUEST_GET_IMSI 11

+#define RIL_REQUEST_DEVICE_IDENTITY 98

 #define MAX_LEN 1024

 #define TIMER 30

 

@@ -38,20 +38,22 @@
     fp = popen("cat /sys/kernel/ccci/boot","r");

     if(fp == NULL)

     {

-        RLOGD("function fp is null\n", __FUNCTION__);

-        return 0;

-    }

-    if(!strlen(buffer))

-    {

-        pclose(fp);

+        RLOGD("function %s fp is null\n", __FUNCTION__);

         return 0;

     }

     fgets(buffer,sizeof(buffer),fp);

+    if(!strlen(buffer))

+    {

+        RLOGD("function %s line %d\n", __FUNCTION__, __LINE__);

+        pclose(fp);

+        return 0;

+    }

     if(buffer[4] == '4')

     {

         pclose(fp);

         return 1;

     }

+    RLOGD("function %s line %d\n", __FUNCTION__, __LINE__);

     pclose(fp);

     return 0;

 }

@@ -70,7 +72,7 @@
     }

     if(fp == NULL)

     {

-        RLOGD("function fp is null\n", __FUNCTION__);

+        RLOGD("function %s fp is null\n", __FUNCTION__);

         return 0;

     }

     while(NULL != fgets(buffer,sizeof(buffer),fp))

@@ -131,7 +133,7 @@
     int res_error = -1;

     lynq_client_t client_t;

     char res_data[MAX_LEN] = {0};

-    client_t.request = RIL_REQUEST_GET_IMSI;

+    client_t.request = RIL_REQUEST_DEVICE_IDENTITY;

     client_t.paramLen = 0;

     client_t.uToken = 999;

     memset(client_t.param, 0, sizeof(client_t.param));

@@ -221,11 +223,11 @@
         /*judge the res_error*/

         if(!res_error)

         {

-            system("uci set lynq_uci.sdk_ready='2'");//Md configurations are inconsistent with AP configurations

+            system("uci set lynq_uci.sdk_ready='0'");

         }

         else

         {

-            system("uci set lynq_uci.sdk_ready='0'");

+            system("uci set lynq_uci.sdk_ready='2'"); //Md configurations are inconsistent with AP configurations

         }

         RLOGD("__FUNCTION__ %s res_error %d\n", __FUNCTION__, res_error);

         /*judge the res_error*/