fixing savepointer for strok

This commit is contained in:
2021-01-01 21:15:58 +01:00
parent 47f9d72aea
commit fb5924cff1
1781 changed files with 6 additions and 350327 deletions

View File

@ -494,15 +494,15 @@ bool bNewerVersion(const char* pu8Local, const char* pu8Remote){
strcpy(u8LocalTmp, pu8Local);
strcpy(u8RemoteTmp, pu8Remote);
char* pu8TokenLocal = strtok_r(u8LocalTmp, ".", &pu8saveptr1);
char* pu8TokenRemote = strtok_r(u8RemoteTmp, ".", &saveptr2) ;
char* pu8TokenLocal = strtok_r(u8LocalTmp, ".", &pu8saveptrLocal);
char* pu8TokenRemote = strtok_r(u8RemoteTmp, ".", &pu8saveptrRemote) ;
bool bReturn = false;
uint8_t u8Index = 0;
while( (u8Index <= 2) && (bReturn == false){
while( (u8Index <= 2) && (bReturn == false)){
u8Index++;
@ -516,8 +516,8 @@ bool bNewerVersion(const char* pu8Local, const char* pu8Remote){
bReturn = true;
}
pu8TokenLocal = strtok_r(NULL, ".", &pu8saveptr1);
pu8TokenRemote = strtok_r(NULL, ".", &saveptr2) ;
pu8TokenLocal = strtok_r(NULL, ".", &pu8saveptrLocal);
pu8TokenRemote = strtok_r(NULL, ".", &pu8saveptrRemote) ;
}
return bReturn;
@ -551,7 +551,6 @@ void app_main(void)
ESP_LOGI(MESH_TAG, "Size: %d", (*currentPartition).size); //passt
ESP_LOGI(MESH_TAG, "Encrypted: %d", (*currentPartition).encrypted);
esp_app_desc_t curPartitionDesc;
err = esp_ota_get_partition_description(currentPartition, &curPartitionDesc);
ESP_ERROR_CHECK(err);
@ -570,7 +569,6 @@ void app_main(void)
/* tcpip initialization */
ESP_ERROR_CHECK(esp_netif_init());