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

Send CALLERROR only as response to CALL message #995

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

Pietfried
Copy link
Contributor

@Pietfried Pietfried commented Feb 21, 2025

Describe your changes

Implemented a check of the enhanced_message to handle in message_callback so that only send CALLERROR on CALL messages.

Remark: We may want to restructure out custom exceptions a little better at some point in order to get rid of that repetitive code.

Issue ticket number and link

Checklist before requesting a review

@@ -1356,6 +1356,9 @@ void ChargePointImpl::message_callback(const std::string& message) {
}
} catch (json::exception& e) {
EVLOG_error << "JSON exception during handling of message: " << e.what();
if (enhanced_message.messageTypeId != MessageTypeId::CALL) {
return; // CALLERROR shall only follow on a CALL message
Copy link
Contributor

@maaikez maaikez Feb 24, 2025

Choose a reason for hiding this comment

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

Also no security event notification?

Copy link
Contributor

@maaikez maaikez left a comment

Choose a reason for hiding this comment

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

Approved, I am only not sure if we shouldn't send a security event notification.

…back so that only send CALLERROR on CALL messages

Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
…sage cant be handled

Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
@Pietfried Pietfried force-pushed the feature/do-only-send-callerror-on-call-messages branch from f54a161 to ee91265 Compare February 25, 2025 08:11
@Pietfried Pietfried merged commit b3de351 into main Feb 27, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants