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: bad MMSI handling #254

Merged
merged 1 commit into from
Dec 4, 2022
Merged

fix: bad MMSI handling #254

merged 1 commit into from
Dec 4, 2022

Conversation

tkurki
Copy link
Member

@tkurki tkurki commented Dec 4, 2022

n2k-signalk is not expecting values to be zero length https://github.com/SignalK/signalk-server/blob/f800fc9c62b249dc9c7f67252339408b0d8fa304/packages/streams/n2k-signalk.js#L121-L122 so if the MMSI seems to be not ok return undefined, as any of the data in the delta don't make any sense with a questionable MMSI.

This will fix the stacktraces produced by data in the server n2k sample file related to #253

n2k-signalk is not expecting values to be zero length
https://github.com/SignalK/signalk-server/blob/f800fc9c62b249dc9c7f67252339408b0d8fa304/packages/streams/n2k-signalk.js#L121-L122
so if the MMSI seems to be not ok return undefined, as
any of the data in the delta don't make any sense with
a questionable MMSI.
@tkurki tkurki added the fix label Dec 4, 2022
@tkurki tkurki requested a review from sbender9 December 4, 2022 14:12
@tkurki tkurki merged commit 82d7a1d into master Dec 4, 2022
@tkurki tkurki deleted the bad-mmsi-handling branch December 4, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants