Browse Source

Merge branch 'master' into DS60-120

alston 3 years ago
parent
commit
ca0a009cdc

+ 7 - 0
EVSE/Modularization/ocpp20/Module_OcppBackend20.c

@@ -317,6 +317,13 @@ static int OCPP20Callback(struct lws *wsi, enum lws_callback_reasons reason, voi
 		case LWS_CALLBACK_WS_PEER_INITIATED_CLOSE:
 			DEBUG_INFO("LWS_CALLBACK_WS_PEER_INITIATED_CLOSE\n");
 			break;
+		case LWS_CALLBACK_CLOSED_CLIENT_HTTP:
+			DEBUG_INFO("LWS_CALLBACK_CLOSED_CLIENT_HTTP\n");
+			if(GetInternetConn() == 1)
+			{
+				DEBUG_INFO("Download new CA certification.\n", system("wget --no-check-certificate -O /root/cacert.pem http://curl.haxx.se/ca/cacert.pem &"));
+			}
+			break;
 		default:
 			DEBUG_INFO("Reason = %d\n", reason);
 			break;

+ 8 - 1
EVSE/Modularization/ocppfiles/Module_OcppBackend.c

@@ -373,12 +373,19 @@ static int OCPP16Callback(struct lws *wsi, enum lws_callback_reasons reason, voi
 		case LWS_CALLBACK_WS_PEER_INITIATED_CLOSE:
 			DEBUG_INFO("LWS_CALLBACK_WS_PEER_INITIATED_CLOSE\n");
 			break;
+		case LWS_CALLBACK_CLOSED_CLIENT_HTTP:
+			DEBUG_INFO("LWS_CALLBACK_CLOSED_CLIENT_HTTP\n");
+			if(GetInternetConn() == 1)
+			{
+				DEBUG_INFO("Download new CA certification.\n", system("wget --no-check-certificate -O /root/cacert.pem http://curl.haxx.se/ca/cacert.pem &"));
+			}
+			break;
+			break;
 		default:
 			DEBUG_INFO("Reason = %d\n", reason);
 			break;
 	}
 
-
 	return 0;
 }
 

+ 7 - 0
EVSE/Modularization/ocppph/Module_OcppBackend.c

@@ -373,6 +373,13 @@ static int OCPP16Callback(struct lws *wsi, enum lws_callback_reasons reason, voi
 		case LWS_CALLBACK_WS_PEER_INITIATED_CLOSE:
 			DEBUG_INFO("LWS_CALLBACK_WS_PEER_INITIATED_CLOSE\n");
 			break;
+		case LWS_CALLBACK_CLOSED_CLIENT_HTTP:
+			DEBUG_INFO("LWS_CALLBACK_CLOSED_CLIENT_HTTP\n");
+			if(GetInternetConn() == 1)
+			{
+				DEBUG_INFO("Download new CA certification.\n", system("wget --no-check-certificate -O /root/cacert.pem http://curl.haxx.se/ca/cacert.pem &"));
+			}
+			break;
 		default:
 			DEBUG_INFO("Reason = %d\n", reason);
 			break;