Procházet zdrojové kódy

2020-03-12 Kathy yeh
1. modify ssl pem path

Kathy_Yeh před 5 roky
rodič
revize
eefbbfea36
1 změnil soubory, kde provedl 28 přidání a 11 odebrání
  1. 28 11
      EVSE/Modularization/ocppfiles/Module_OcppBackend.c

+ 28 - 11
EVSE/Modularization/ocppfiles/Module_OcppBackend.c

@@ -1,43 +1,60 @@
 #include 	<sys/time.h>
 #include 	<sys/timeb.h>
-#include    	<sys/types.h>
-#include    	<sys/stat.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
 #include 	<sys/ioctl.h>
 #include 	<sys/socket.h>
 #include 	<sys/ipc.h>
 #include 	<sys/shm.h>
+#include 	<sys/shm.h>
 #include 	<sys/mman.h>
 #include 	<linux/wireless.h>
 #include 	<linux/sockios.h>
 #include 	<linux/socket.h>
 #include 	<arpa/inet.h>
 #include 	<netinet/in.h>
+
 #include 	<unistd.h>
 #include 	<stdarg.h>
-#include    	<stdio.h>      
-#include    	<stdlib.h>     
-#include    	<unistd.h>     
-#include    	<fcntl.h>      
-#include    	<termios.h>    
+#include    <stdio.h>      /*�зǿ�J��X�w�q*/
+#include    <stdlib.h>     /*�зǨ�Ʈw�w�q*/
+#include    <unistd.h>     /*Unix �зǨ�Ʃw�q*/
+#include    <fcntl.h>      /*�ɱ���w�q*/
+#include    <termios.h>    /*PPSIX �׺ݱ���w�q*/
+#include    <errno.h>      /*���~���w�q*/
 #include 	<errno.h>
 #include 	<string.h>
 #include	<time.h>
 #include	<ctype.h>
 #include 	<ifaddrs.h>
-#include 	"libwebsockets.h"
+//#include 	//<json-c/json_config.h>
+//#include 	//<json-c/json_object.h>
+//#include 	//<json-c/json_tokener.h>
+#include 	"./lib/Headers/libwebsockets.h"
 #include 	<lws_config.h>
+#include    "./json-c/JsonParser.h"
+//#include	"define.h"
 #include	"hashmap.h"
-#include    	"SystemLogMessage.h"
+//#include 	"HashTable.h"
+#include    "SystemLogMessage.h"
 #include 	"ShareMemory.h"
 #include 	<pthread.h>
-#include    	"MessageHandler.h"
+#include    "MessageHandler.h"
 #include	"sqlite3.h"
 
 
+//#include	"sqlite3ext.h"
+//#include	"TransactionQueue.h"
 #ifndef SPEC_LATEST_SUPPORTED
 #define SPEC_LATEST_SUPPORTED 13
 #endif
 
+#if 0
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#endif
 
 #define Debug
 //#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
@@ -689,7 +706,7 @@ int ConnectWsServer()
 	ContextInfo.ssl_private_key_password = NULL;
 	ContextInfo.ssl_cert_filepath = NULL;//"./ssl_key/client_cert.pem";
 	ContextInfo.ssl_private_key_filepath = NULL;//"./ssl_key/client_key.pem";
-	ContextInfo.ssl_ca_filepath = "./root/cacert.pem";
+	ContextInfo.ssl_ca_filepath = "/root/cacert.pem";//"./cacert.pem";
 	ContextInfo.ssl_cipher_list = NULL; //use default one
 	ContextInfo.gid = -1;
 	ContextInfo.uid = -1;