diff --git a/lib/ocpp/v16/charge_point_impl.cpp b/lib/ocpp/v16/charge_point_impl.cpp index e55698abd..99aed3d72 100644 --- a/lib/ocpp/v16/charge_point_impl.cpp +++ b/lib/ocpp/v16/charge_point_impl.cpp @@ -1453,14 +1453,13 @@ void ChargePointImpl::handleChangeConfigurationRequest(ocpp::Callconfiguration_key_changed_callbacks[call.msg.key](kv.value()); - } else { - if (this->generic_configuration_key_changed_callback != nullptr and - response.status == ConfigurationStatus::Accepted) { - kv.value().value = call.msg.value; - this->generic_configuration_key_changed_callback(kv.value()); - } + } else if (this->generic_configuration_key_changed_callback != nullptr and + response.status == ConfigurationStatus::Accepted) { + kv.value().value = call.msg.value; + this->generic_configuration_key_changed_callback(kv.value()); } } +} void ChargePointImpl::switchSecurityProfile(int32_t new_security_profile, int32_t max_connection_attempts) { EVLOG_info << "Switching security profile from " << this->configuration->getSecurityProfile() << " to "