Skip to content

Commit

Permalink
reject for remotestart
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Suess <[email protected]>
  • Loading branch information
Matthias-NIDEC committed Nov 27, 2024
1 parent 1b47880 commit 6f6a52c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ocpp/v16/charge_point_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1926,8 +1926,9 @@ void ChargePointImpl::handleRemoteStartTransactionRequest(ocpp::Call<RemoteStart
std::vector<int32_t> 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<RemoteStartTransactionResponse> call_result(response, call.uniqueId);
this->message_dispatcher->dispatch_call_result(call_result);
Expand Down

0 comments on commit 6f6a52c

Please sign in to comment.