Skip to content

Commit

Permalink
added additional logging
Browse files Browse the repository at this point in the history
Signed-off-by: Piet Gömpel <[email protected]>
  • Loading branch information
Pietfried committed Jan 10, 2025
1 parent 028b0f5 commit d1001c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions modules/Auth/lib/AuthHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@ TokenHandlingResult AuthHandler::handle_token(const ProvidedIdToken& provided_to
}

if (attempt_stop_with_parent_id_token) {
EVLOG_info << "Attempting to stop with parent_id_token:";
for (const auto& validation_result : validation_results) {
if (validation_result.authorization_status == AuthorizationStatus::Accepted &&
validation_result.parent_id_token.has_value()) {
EVLOG_info << "Accepted and has parent_id_token";
// check if parent_id_token is equal to master_pass_group_id
if (this->equals_master_pass_group_id(validation_result.parent_id_token)) {
EVLOG_info << "Provided parent_id_token is equal to master_pass_group_id. Stopping all active "
Expand All @@ -237,6 +239,7 @@ TokenHandlingResult AuthHandler::handle_token(const ProvidedIdToken& provided_to
const auto evse_used_for_transaction =
this->used_for_transaction(referenced_evses, validation_result.parent_id_token.value().value);
if (evse_used_for_transaction != -1) {
EVLOG_info << "Used for transaction at evse: " << evse_used_for_transaction;
if (!this->evses[evse_used_for_transaction]->transaction_active) {
return TokenHandlingResult::ALREADY_IN_PROCESS;
} else {
Expand All @@ -247,6 +250,8 @@ TokenHandlingResult AuthHandler::handle_token(const ProvidedIdToken& provided_to
EVLOG_info << "Transaction was stopped because parent_id_token was used for transaction";
return TokenHandlingResult::USED_TO_STOP_TRANSACTION;
}
} else {
EVLOG_info << validation_result.parent_id_token.value().value << " not used for transaction";
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions tests/ocpp_tests/test_sets/ocpp201/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ def on_transaction_event(**kwargs):
test_utility, charge_point_v201, "TransactionEvent", {"eventType": "Started"}
)

await asyncio.sleep(1)

# C09.FR.07: With a valid token in cache with the same groupId the CS shall end
# the autorization of the transaction without first sending an AuthorizeRequest
test_utility.forbidden_actions.append("Authorize")
Expand Down

0 comments on commit d1001c2

Please sign in to comment.