|
@@ -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)
|
|
|
{
|