소스 검색

[Improve][Modularization][Module_OcppBackend / Module_OcppBackend]

2021.09.15 / Folus Wen

Actions:
1. Add sleep 1 second after call thread process for pointer lost issue.

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 3 년 전
부모
커밋
da6bdb4d7c
3개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      EVSE/Modularization/ocpp20/MessageHandler.c
  2. 2 0
      EVSE/Modularization/ocppfiles/MessageHandler.c
  3. 2 0
      EVSE/Modularization/ocppph/MessageHandler.c

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

@@ -13899,6 +13899,7 @@ int handleGetLogRequest(char *uuid, char *payload)
 	{
 		interLock.isGetLogGoing = ON;
 		pthread_create(&th_Status, NULL, GetLogProcess, stringtrimspace(payload));
+		sleep(1);
 	}
 	else
 		DEBUG_WARN("Other GetDiagnostic request on going.\n");
@@ -17033,6 +17034,7 @@ int handleUpdateFirmwareRequest(char *uuid, char *payload)
 	{
 		interLock.isUpdateFirmwareGoing = ON;
 		pthread_create(&t, NULL, UpdateFirmwareProcess, stringtrimspace(payload));
+		sleep(1);
 	}
 	else
 		DEBUG_WARN("Other UpdateFirmware request on going.\n");

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

@@ -10317,6 +10317,7 @@ int handleGetDiagnosticsRequest(char *uuid, char *payload)
 	{
 		interLock.isGetDiagnosticGoing = 1;
 		pthread_create(&th_Status, NULL, GetDiagnosticsProcess, stringtrimspace(payload));
+		sleep(1);
 	}
 	else
 		DEBUG_WARN("Other GetDiagnostic request on going.\n");
@@ -13158,6 +13159,7 @@ int handleUpdateFirmwareRequest(char *uuid, char *payload)
 	{
 		interLock.isUpdateFirmwareGoing = 1;
 		pthread_create(&t, NULL, UpdateFirmwareProcess, stringtrimspace(payload));
+		sleep(1);
 	}
 	else
 		DEBUG_WARN("Other UpdateFirmware request on going.\n");

+ 2 - 0
EVSE/Modularization/ocppph/MessageHandler.c

@@ -10053,6 +10053,7 @@ int handleGetDiagnosticsRequest(char *uuid, char *payload)
 	{
 		interLock.isGetDiagnosticGoing = 1;
 		pthread_create(&th_Status, NULL, GetDiagnosticsProcess, stringtrimspace(payload));
+		sleep(1);
 	}
 	else
 		DEBUG_WARN("Other GetDiagnostic request on going.\n");
@@ -12896,6 +12897,7 @@ int handleUpdateFirmwareRequest(char *uuid, char *payload)
 	{
 		interLock.isUpdateFirmwareGoing = 1;
 		pthread_create(&t, NULL, UpdateFirmwareProcess, stringtrimspace(payload));
+		sleep(1);
 	}
 	else
 		DEBUG_WARN("Other UpdateFirmware request on going.\n");