@@ -1356,24 +1356,24 @@ void ChargePointImpl::message_callback(const std::string& message) {
1356
1356
}
1357
1357
} catch (json::exception & e) {
1358
1358
EVLOG_error << " JSON exception during handling of message: " << e.what ();
1359
+ this ->securityEventNotification (ocpp::security_events::INVALIDMESSAGES, std::optional<CiString<255 >>(message),
1360
+ true );
1359
1361
if (enhanced_message.messageTypeId != MessageTypeId::CALL) {
1360
1362
return ; // CALLERROR shall only follow on a CALL message
1361
1363
}
1362
1364
if (json_message.is_array () && json_message.size () > MESSAGE_ID) {
1363
1365
auto call_error = CallError (enhanced_message.uniqueId , " FormationViolation" , e.what (), json ({}, true ));
1364
1366
this ->message_dispatcher ->dispatch_call_error (call_error);
1365
- this ->securityEventNotification (ocpp::security_events::INVALIDMESSAGES,
1366
- std::optional<CiString<255 >>(message), true );
1367
1367
}
1368
1368
} catch (const EnumConversionException& e) {
1369
1369
EVLOG_error << " EnumConversionException during handling of message: " << e.what ();
1370
+ this ->securityEventNotification (ocpp::security_events::INVALIDMESSAGES, std::optional<CiString<255 >>(message),
1371
+ true );
1370
1372
if (enhanced_message.messageTypeId != MessageTypeId::CALL) {
1371
1373
return ; // CALLERROR shall only follow on a CALL message
1372
1374
}
1373
1375
auto call_error = CallError (enhanced_message.uniqueId , " FormationViolation" , e.what (), json ({}, true ));
1374
1376
this ->message_dispatcher ->dispatch_call_error (call_error);
1375
- this ->securityEventNotification (ocpp::security_events::INVALIDMESSAGES, std::optional<CiString<255 >>(message),
1376
- true );
1377
1377
}
1378
1378
}
1379
1379
0 commit comments