Sfoglia il codice sorgente

修改改FOTA在COTA之后MD5校验失败错误,同时完善代码格式

warfalcon-spunky 5 anni fa
parent
commit
0e887b1637
1 ha cambiato i file con 10 aggiunte e 10 eliminazioni
  1. 10 10
      iotkit-embedded/src/ota/iotx_ota.c

+ 10 - 10
iotkit-embedded/src/ota/iotx_ota.c

@@ -135,16 +135,16 @@ static int ota_callback(void *pcontext, const char *msg, uint32_t msg_len, iotx_
             h_ota->type = IOT_OTAT_FOTA;
             h_ota->state = IOT_OTAS_FETCHING;
 
-			if (NULL != h_ota->md5) 
-			{
-				otalib_MD5Deinit(h_ota->md5);
-			}
-			h_ota->md5 = otalib_MD5Init();
-
-			if (NULL != h_ota->sha256) 
-			{
-				otalib_Sha256Deinit(h_ota->sha256);
-			}
+            if (NULL != h_ota->md5)
+            {
+                otalib_MD5Deinit(h_ota->md5);
+            }
+            h_ota->md5 = otalib_MD5Init();
+
+            if (NULL != h_ota->sha256) 
+            {
+                otalib_Sha256Deinit(h_ota->sha256);
+            }
 			h_ota->sha256 = otalib_Sha256Init();				
 
             if (h_ota->fetch_cb) {