[Bugfix][T106BUG-585] The second upgrade, during the verification phase, the upgrade progress is checked to be 10

    Only Configure:No
    Affected branch: master
    Affected module: fota
    Is it affected on both ZXIC and MTK:only ZXIC
    Self-test: Yes
    Doc Update: No

Change-Id: Id72aa3c3373c00e16acfe04fbd27013349e01662
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
index 5dab391..749eb39 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
@@ -152,14 +152,29 @@
     fp =fopen(FOTA_REBOOT_FLAG,"w+");

     if(fp == NULL)

     {

-        LYERRLOG("Creaf get upgrade status flag failed");

+        LYERRLOG("Creat get upgrade status flag failed");

         return -1;

     }

 

     fwrite(&reboot_flg,sizeof(int),1,fp);

     fclose(fp);

     system("sync");

-    

+

+    //fix T106BUG-585 start 

+    total_size = 0;

+    upgrade_size = 0;

+

+    fp = fopen(FOTA_UPGRADE_PROCESS,"w+");

+    if(fp == NULL) 

+    {

+        LYERRLOG("Error opening file");

+        return -1;

+    }

+       

+    fprintf(fp, "%d,%d\n", total_size, upgrade_size);

+    fclose(fp);

+    //fix T106BUG-585 end

+     

     ret = lynq_fota_verify();

     if(ret != 0)

     {

@@ -263,6 +278,8 @@
     upgrade_size = p_status->upgraded_size;

 

     FILE *fp = NULL;

+

+    

     fp = fopen(FOTA_UPGRADE_PROCESS,"w");

     if (fp == NULL) 

     {