Просмотр исходного кода

2019.09.26 / Kathy Yeh Actions: [OcppBackend Module] (1)modify Configuration boolean type error (2)modify Configuration memory error for all configuration returned (3)modify free ptr error for JSON-C (4)modify sampledValue for meterValue Files: 1. As follow commit history. Image version: D0.00.XX.XXXX.PH Image checksum: XXXXXXXX Hardware PWB P/N : XXXXXXX Hardware Version : XXXXXXX

Kathy_Yeh 5 лет назад
Родитель
Сommit
bb46434570
2 измененных файлов с 482 добавлено и 316 удалено
  1. 470 304
      EVSE/Modularization/ocppfiles/JsonParser.c
  2. 12 12
      EVSE/Modularization/ocppfiles/Module_OcppBackend.c

Разница между файлами не показана из-за своего большого размера
+ 470 - 304
EVSE/Modularization/ocppfiles/JsonParser.c


+ 12 - 12
EVSE/Modularization/ocppfiles/Module_OcppBackend.c

@@ -604,7 +604,7 @@ int addq(char *uuid, char *data) {
 		}
 		else
 		{
-			printf("無法�得記憶體空間新增資料\n");
+			printf("?¡æ??–å?記憶體空?“新增è??™\n");
 		}
 		printf("addq\n");
 		return 0;
@@ -664,7 +664,7 @@ int storequeue(){
 
 	//write queue to flash
 	unsigned int i,Chk;
-	unsigned char *ptr;
+	unsigned char *ptr = NULL;
 	int fd,wrd;
 
 	// Save factory default setting value to flash backup setting block
@@ -674,18 +674,18 @@ int storequeue(){
 		#ifdef SystemLogMessage
 		DEBUG_ERROR("open /Storage/OCPP/queue.txt NG");
 		#endif
-		free(ptr);
+		//free(ptr);
 		return 0;
 	}
 	wrd=write(fd, &front, sizeof(node));
 	close(fd);
 	if(wrd!=(sizeof(node)))
 	{
-		#ifdef SystemLogMessage
-		DEBUG_ERROR("write /Storage/OCPP/queue.txt NG");
-		#endif
-		free(ptr);
-		return 0;
+			#ifdef SystemLogMessage
+			DEBUG_ERROR("write /Storage/OCPP/queue.txt NG");
+			#endif
+			//free(ptr);
+			return 0;
 	}
 
 	return 0;
@@ -720,7 +720,7 @@ void* processTransactionQueue(void* data) {
 
 		sleep(30);  // sleep for 30 seconds
 	}
-  pthread_exit(NULL); // ���}�l�����
+  pthread_exit(NULL); // ���}�l�����
   return 0;
 }
 
@@ -846,7 +846,7 @@ int main(void)
 		fprintf(stderr, "Opened database successfully\n");
 	}
 
-	 /* 建立 Table log buffer */
+	 /* 建ç? Table log buffer */
 	int rc =sqlite3_exec(db, createsql, 0, 0, &errMsg);
 	if (SQLITE_OK != rc)
 	{
@@ -858,7 +858,7 @@ int main(void)
 		fprintf(stderr, "Opened log buffer table successfully\n");
 	}
 
-	 /* 建立 Table OcppAuthCache */
+	 /* 建ç? Table OcppAuthCache */
 	rc =sqlite3_exec(db, sqlOcppAuthCache, 0, 0, &errMsg);
 	if (SQLITE_OK != rc)
 	{
@@ -870,7 +870,7 @@ int main(void)
 		fprintf(stderr, "Opened OcppAuthCache table successfully\n");
 	}
 
-	 /* 建立 Table OcppAuthLocal */
+	 /* 建ç? Table OcppAuthLocal */
 	rc =sqlite3_exec(db, sqlOcppAuthLocal, 0, 0, &errMsg);
 	if (SQLITE_OK != rc)
 	{

Некоторые файлы не были показаны из-за большого количества измененных файлов