소스 검색

[Improve][Modularization][Module_OcppBackend]

2020.12.24 / Folus Wen

Actions:
1. Add ping command between download image file period.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 4 년 전
부모
커밋
553eb1e75c
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      EVSE/Modularization/ocpp20/MessageHandler.c
  2. 4 0
      EVSE/Modularization/ocppfiles/MessageHandler.c

+ 4 - 0
EVSE/Modularization/ocpp20/MessageHandler.c

@@ -14978,6 +14978,7 @@ int httpDownLoadFile(char *location, char *path, char *filename,char *url)
 	//DEBUG_INFO("filename=%s\n",filename);
 	//DEBUG_INFO("url=%s\n",url);
 	sprintf(FilePath,"/mnt/%s",filename);
+	system("ping 8.8.8.8 &");
 
 	if((access(FilePath,F_OK))!=-1)
 	{
@@ -14997,6 +14998,7 @@ int httpDownLoadFile(char *location, char *path, char *filename,char *url)
 		return FALSE;
 	}
 
+	system("pkill ping");
 	return TRUE;
 }
 
@@ -15008,6 +15010,7 @@ int ftpDownLoadFile(char *location, char *user, char *password, int port, char *
 	int systemresult;
 	//char temp[100];
 	sprintf(FilePath,"/mnt/%s",filename);
+	system("ping 8.8.8.8 &");
 
 	if((access(FilePath,F_OK))!=-1)
 	{
@@ -15031,6 +15034,7 @@ int ftpDownLoadFile(char *location, char *user, char *password, int port, char *
 		return FALSE;
 	}
 
+	system("pkill ping");
 	return TRUE;
 
 }

+ 4 - 0
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -14614,6 +14614,7 @@ int httpDownLoadFile(char *location, char *path, char *filename,char *url)
 	//DEBUG_INFO("filename=%s\n",filename);
 	//DEBUG_INFO("url=%s\n",url);
 	sprintf(FilePath,"/mnt/%s",filename);
+	system("ping 8.8.8.8 &");
 
 	if((access(FilePath,F_OK))!=-1)
 	{
@@ -14632,6 +14633,7 @@ int httpDownLoadFile(char *location, char *path, char *filename,char *url)
 		DEBUG_INFO("http DownLoad error!\n");
 		return FALSE;
 	}
+	system("pkill ping");
 
 	return TRUE;
 }
@@ -14644,6 +14646,7 @@ int ftpDownLoadFile(char *location, char *user, char *password, int port, char *
 	int systemresult;
 	//char temp[100];
 	sprintf(FilePath,"/mnt/%s",filename);
+	system("ping 8.8.8.8 &");
 
 	if((access(FilePath,F_OK))!=-1)
 	{
@@ -14667,6 +14670,7 @@ int ftpDownLoadFile(char *location, char *user, char *password, int port, char *
 		return FALSE;
 	}
 
+	system("pkill ping");
 	return TRUE;
 
 }