fix_bug89217

Change-Id: I8fd51c8da48f80ac8c70fe9c64f5b96ed099c0c0
diff --git a/mbtk/liblynq_lib/src/lynq_time.c b/mbtk/liblynq_lib/src/lynq_time.c
index 269527d..57383a1 100644
--- a/mbtk/liblynq_lib/src/lynq_time.c
+++ b/mbtk/liblynq_lib/src/lynq_time.c
@@ -53,7 +53,7 @@
 // get RTC time
 int lynq_get_rtc_time(unsigned long *ulsec);
 
-
+int sync_time_flag = 0;
 
 //int req_time_set(int type, char *time, int *cme_err);
 static int metis_strptime(char *str_time)
@@ -217,6 +217,7 @@
     UNUSED(enable);
     int ntp_status = 0;
     int ret = 0;
+    sync_time_flag = 0;
     if(enable)
     {
         set_time_type(LYNQ_TIME_TYPE_NTP);
@@ -224,11 +225,13 @@
         if(ntp_status == 0)
         {
             ret = 0;
+            sync_time_flag = 0;
         }
         else
         {
             ret = -1;
             set_time_type(LYNQ_TIME_TYPE_UNUSE);
+            sync_time_flag = -1;
         }
     }
     else
@@ -243,6 +246,7 @@
 int modem_time_enable(int enable)
 {
     UNUSED(enable);
+    sync_time_flag = 0;
 
     if(enable)
     {
@@ -260,6 +264,7 @@
 int gnss_time_enable(int enable)
 {
     UNUSED(enable);
+    sync_time_flag = 0;
     if(enable)
     {
         set_time_type(LYNQ_TIME_TYPE_GNSS);
@@ -366,5 +371,13 @@
     return 0;
 }
 
+int get_sync_time_result(void )
+{
+
+    return sync_time_flag;
+}
+
+
+