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(inputs.s7comm): Truncate string to actual length #14283

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

phagemann
Copy link
Contributor

@phagemann phagemann commented Nov 13, 2023

  • Updated associated README.md. - Not necessary
  • Wrote appropriate unit tests.- Not necessary
  • Pull request title or commits are in conventional commit format

resolves #

Change string parsing to truncate string at actual length instead of the max string length.
Byte 0 reflects the max string length,
Byte 1 reflects the actual length

Behavior before this PR:
got [30 17 76 95 50 52 48 95 84 75 49 52 95 51 48 46 112 114 100 112 114 100 97 111 46 112 114 100 76 79 0 0] for field "ProgrammName" @ 24 --> L_240_TK14_30.prdprdao.prdLO (string)
now:
got [30 17 76 95 50 52 48 95 84 75 49 52 95 51 48 46 112 114 100 112 114 100 97 111 46 112 114 100 76 79 0 0] for field "ProgrammName" @ 24 --> L_240_TK14_30.prd (string)

@phagemann phagemann changed the title fix(inputs.s7comm) truncate string to actual length fix(inputs.s7comm): truncate string to actual length Nov 13, 2023
@phagemann phagemann marked this pull request as ready for review November 13, 2023 11:18
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this bug @phagemann!

@srebhan srebhan changed the title fix(inputs.s7comm): truncate string to actual length fix(inputs.s7comm): Truncate string to actual length Nov 13, 2023
@srebhan srebhan added area/iot New plugins or features relating to IoT monitoring area/agent ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Nov 13, 2023
@srebhan srebhan added fix pr to fix corresponding bug and removed area/agent labels Nov 13, 2023
@powersj powersj merged commit fd65ce8 into influxdata:master Nov 13, 2023
6 checks passed
@github-actions github-actions bot added this to the v1.29.0 milestone Nov 13, 2023
@srebhan srebhan modified the milestones: v1.29.0, v1.28.5 Nov 15, 2023
powersj pushed a commit that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/iot New plugins or features relating to IoT monitoring fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants