Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in ClearChargingProfile.req #872

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

Pietfried
Copy link
Contributor

@Pietfried Pietfried commented Nov 19, 2024

Describe your changes

Fixed issue that other charging profiles were cleared even when a profile id was specified

Issue ticket number and link

Checklist before requesting a review

@Pietfried Pietfried added bug Something isn't working OCPP1.6 labels Nov 19, 2024

} else if (this->smart_charging_handler->clear_all_profiles_with_filter(
} else if (!call.msg.id and
this->smart_charging_handler->clear_all_profiles_with_filter(
call.msg.id, call.msg.connectorId, call.msg.stackLevel, call.msg.chargingProfilePurpose, false)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since call.msg.id must be std::nullopt (because of the!call.msg.id in the if) at this point maybe you can directly pass std::nullopt for call.msg.if` here which would make this a bit more readable

@Pietfried Pietfried merged commit c9a6f45 into main Nov 21, 2024
8 checks passed
@Pietfried Pietfried deleted the bugfix/clear-charging-profile branch November 21, 2024 15:56
Pietfried added a commit that referenced this pull request Nov 25, 2024
* Fixed issue that other charging profiles were cleared even when a profile id was specified
---------

Signed-off-by: Piet Gömpel <[email protected]>
Signed-off-by: Piet Gömpel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OCPP1.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants