[Bugfix][R305][bug-view-1539][fota] During local upgrade, there is a probability of returning a loading failure, but in reality, it has already succeeded

Change-Id: I8d41c9d084eac161e0eae776f3cee54adfffb7de
diff --git a/lynq/CPE_COMMON/ap/app/cgi/cgi.c b/lynq/CPE_COMMON/ap/app/cgi/cgi.c
index a7c86f3..3d2b076 100755
--- a/lynq/CPE_COMMON/ap/app/cgi/cgi.c
+++ b/lynq/CPE_COMMON/ap/app/cgi/cgi.c
@@ -1,3 +1,4 @@
+

 #include <stdio.h>

 #include <stdlib.h>

 #include <string.h>

@@ -289,6 +290,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +305,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/CPE_TELKOMSEL/ap/app/cgi/cgi.c b/lynq/CPE_TELKOMSEL/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/CPE_TELKOMSEL/ap/app/cgi/cgi.c
+++ b/lynq/CPE_TELKOMSEL/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/MD310/ap/app/cgi/cgi.c b/lynq/MD310/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/MD310/ap/app/cgi/cgi.c
+++ b/lynq/MD310/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/MD310EU/ap/app/cgi/cgi.c b/lynq/MD310EU/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/MD310EU/ap/app/cgi/cgi.c
+++ b/lynq/MD310EU/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/R305/ap/app/cgi/cgi.c b/lynq/R305/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/R305/ap/app/cgi/cgi.c
+++ b/lynq/R305/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/R306/ap/app/cgi/cgi.c b/lynq/R306/ap/app/cgi/cgi.c
index 5f56ca5..87d4497 100755
--- a/lynq/R306/ap/app/cgi/cgi.c
+++ b/lynq/R306/ap/app/cgi/cgi.c
@@ -288,6 +288,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -300,7 +301,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/R306BR/ap/app/cgi/cgi.c b/lynq/R306BR/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/R306BR/ap/app/cgi/cgi.c
+++ b/lynq/R306BR/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/R306_MTN/ap/app/cgi/cgi.c b/lynq/R306_MTN/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/R306_MTN/ap/app/cgi/cgi.c
+++ b/lynq/R306_MTN/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/R307/ap/app/cgi/cgi.c b/lynq/R307/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/R307/ap/app/cgi/cgi.c
+++ b/lynq/R307/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/R307L/ap/app/cgi/cgi.c b/lynq/R307L/ap/app/cgi/cgi.c
index a7c86f3..f8d831b 100755
--- a/lynq/R307L/ap/app/cgi/cgi.c
+++ b/lynq/R307L/ap/app/cgi/cgi.c
@@ -289,6 +289,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -303,7 +304,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/S300/ap/app/cgi/cgi.c b/lynq/S300/ap/app/cgi/cgi.c
index 5f56ca5..87d4497 100755
--- a/lynq/S300/ap/app/cgi/cgi.c
+++ b/lynq/S300/ap/app/cgi/cgi.c
@@ -288,6 +288,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -300,7 +301,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/S300_AIC/ap/app/cgi/cgi.c b/lynq/S300_AIC/ap/app/cgi/cgi.c
index 5f56ca5..87d4497 100755
--- a/lynq/S300_AIC/ap/app/cgi/cgi.c
+++ b/lynq/S300_AIC/ap/app/cgi/cgi.c
@@ -288,6 +288,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -300,7 +301,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }

diff --git a/lynq/S300_COMMON/ap/app/cgi/cgi.c b/lynq/S300_COMMON/ap/app/cgi/cgi.c
index 5f56ca5..87d4497 100755
--- a/lynq/S300_COMMON/ap/app/cgi/cgi.c
+++ b/lynq/S300_COMMON/ap/app/cgi/cgi.c
@@ -288,6 +288,7 @@
     int upgradeStatus, result;

 

     system("fota_upi -u verify > /dev/null 2>&1");

+    sleep(1);

     result = fota_get_update_status(&upgradeStatus);

     if(result < 0)

     {

@@ -300,7 +301,6 @@
     else

     {

         print_json_response(1, "File verification successful, start updating...");

-        sleep(1);

         system("fota_upi -u recovery > /dev/null 2>&1 &");

     }

 }