From 6f6a52c615bf91af3071026f432c655d67a4718b Mon Sep 17 00:00:00 2001 From: Matthias Suess Date: Wed, 27 Nov 2024 17:19:08 +0100 Subject: [PATCH] reject for remotestart Signed-off-by: Matthias Suess --- lib/ocpp/v16/charge_point_impl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ocpp/v16/charge_point_impl.cpp b/lib/ocpp/v16/charge_point_impl.cpp index 8e0042ca4..3033295e9 100644 --- a/lib/ocpp/v16/charge_point_impl.cpp +++ b/lib/ocpp/v16/charge_point_impl.cpp @@ -1926,8 +1926,9 @@ void ChargePointImpl::handleRemoteStartTransactionRequest(ocpp::Call referenced_connectors; if (call.msg.connectorId) { - if (call.msg.connectorId.value() <= 0) { - EVLOG_warning << "Received RemoteStartTransactionRequest with connector id <= 0"; + if (call.msg.connectorId.value() <= 0 or call.msg.connectorId.value() > this->configuration->getNumberOfConnectors()) { + EVLOG_warning << "Received RemoteStartTransactionRequest with connector id <= 0 or > " + << this->configuration->getNumberOfConnectors(); response.status = RemoteStartStopStatus::Rejected; ocpp::CallResult call_result(response, call.uniqueId); this->message_dispatcher->dispatch_call_result(call_result);