From 1addcfaa00abeed365cdeb8e3ad9e7ad455dae96 Mon Sep 17 00:00:00 2001 From: Playxboxtion963 Date: Sat, 22 Nov 2025 23:47:17 +0000 Subject: [PATCH] Repair TC_046_1_CS/reservation --- src/MicroOcpp/Model/ConnectorBase/Connector.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/MicroOcpp/Model/ConnectorBase/Connector.cpp b/src/MicroOcpp/Model/ConnectorBase/Connector.cpp index 11142dc9..0c78b2fe 100644 --- a/src/MicroOcpp/Model/ConnectorBase/Connector.cpp +++ b/src/MicroOcpp/Model/ConnectorBase/Connector.cpp @@ -736,7 +736,18 @@ std::shared_ptr Connector::beginTransaction(const char *idTag) { parentIdTag)) { //reservation blocks connector offlineBlockedResv = true; //when offline, tx is always blocked - + + //if Reservation doesn't have ParentID. And idTag of try to start transaction are unmatch of Reservation. + if (reservation->getParentIdTag() != nullptr) + { + if (strlen(reservation->getParentIdTag()) == 0) + { + // Reservation doesn't have ParentID. + MO_DBG_INFO("connector %u reserved - abort transaction", connectorId); + updateTxNotification(TxNotification_ReservationConflict); + return nullptr; + } + } //if parentIdTag is known, abort this tx immediately, otherwise wait for Authorize.conf to decide if (parentIdTag) { //parentIdTag known