Skip to content

Conversation

@markushx
Copy link
Contributor

OCPP implementation had a few issues:

  • Logging had a lot of trailing \n
  • BootNotification did not transport Serial Number and other information, because the NULL check is wrong.
  • statically allocated string variables are free'd
  • zero-length NULL payload is tried to be printed in websocket, which crashes.

@markushx markushx force-pushed the ocpp-fixes branch 2 times, most recently from a97d048 to d6ab05f Compare December 17, 2025 13:18
Logging had a lot of trailing \n.

Signed-off-by: Markus Becker <[email protected]>
BootNotification did not transport Serial Number and other information,
because the NULL check is wrong.

Signed-off-by: Markus Becker <[email protected]>
Writable string entries in ocpp_cfg_info are free'd if non NULL in
ocpp_set_cfg_val(). Thus they should not be statically allocated.
Initialise with NULL instead.

CFG_SUPPORTED_FEATURE_PROFILE is not writable and should be fine.

Signed-off-by: Markus Becker <[email protected]>
OCPP pongs do not carry payload and cannot be NET_DBG'd without crash.

Signed-off-by: Markus Becker <[email protected]>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants