Skip to content

Commit

Permalink
fix: missing bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
shingoxx222 committed Nov 7, 2024
1 parent 6061ad2 commit e4296b0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3596,16 +3596,13 @@ void ChargePoint::handle_install_certificate_req(Call<InstallCertificateRequest>

if ((msg.certificateType == InstallCertificateUseEnum::CSMSRootCertificate ||
msg.certificateType == InstallCertificateUseEnum::ManufacturerRootCertificate) &&
this->device_model->get_value<int>(ControllerComponentVariables::SecurityProfile) <= 1)
{
this->device_model->get_value<int>(ControllerComponentVariables::SecurityProfile) <= 1) {
response.status = InstallCertificateStatusEnum::Rejected;
response.statusInfo = StatusInfo();
auto reason = ProfileValidationResultEnum::InvalidSecurityProfile;
response.statusInfo->reasonCode = conversions::profile_validation_result_to_reason_code(reason);
response.statusInfo->additionalInfo = conversions::profile_validation_result_to_string(reason);
}
else
{
} else {
const auto result = this->evse_security->install_ca_certificate(
msg.certificate.get(), ocpp::evse_security_conversions::from_ocpp_v201(msg.certificateType));
response.status = ocpp::evse_security_conversions::to_ocpp_v201(result);
Expand All @@ -3615,8 +3612,8 @@ void ChargePoint::handle_install_certificate_req(Call<InstallCertificateRequest>
"Installed certificate: " + conversions::install_certificate_use_enum_to_string(msg.certificateType);
this->security_event_notification_req(CiString<50>(security_event), CiString<255>(tech_info), true,
utils::is_critical(security_event));
}
}

ocpp::CallResult<InstallCertificateResponse> call_result(response, call.uniqueId);
this->send<InstallCertificateResponse>(call_result);
}
Expand Down

0 comments on commit e4296b0

Please sign in to comment.