Skip to content

Conversation

@towynlin
Copy link
Contributor

@towynlin towynlin commented Aug 1, 2025

What changed?

The Sofar Ocean server backend now supports the cellular-only queue for spotter_tx_data! This PR updates the checks for max payload length, since it varies depending on the telemetry channel. For Iridium SBD, the max payload length is 311 as before, but the cellular payload max is 1000 bytes.

Also, this PR fixes a memory leak. Previously, when payloads were > 311 bytes, we would allocate the buffer and return an error without freeing the buffer.

How does it make Bristlemouth better?

Enables Bristlemouth developers to manage telemetry costs by selectively using a cellular-only message queue on Spotter. These messages will be dropped and never sent if a cellular connection is not available.

Where should reviewers focus?

Please review all changes, less than 100 lines. I only modified one function and expanded its associated unit tests.

Checklist

  • Add or update unit tests for changed code
  • Ensure all submodules up to date. If this PR relies on changes in submodules, merge those PRs first, then point this PR at/after the merge commit
  • Ensure code is formatted correctly with clang-format. If there are large formatting changes, they should happen in a separate whitespace-only commit on this PR after all approvals.

@towynlin
Copy link
Contributor Author

towynlin commented Aug 1, 2025

Matt pointed out to me IRL that there was no memory leak before — I was mistaken on that point. :shipit:

@towynlin towynlin changed the title fix: max spotter tx msg len for cellular, mem leak fix: max spotter tx msg len for cellular Aug 1, 2025
@towynlin towynlin merged commit 0516048 into main Aug 1, 2025
3 checks passed
@towynlin towynlin deleted the fix/max-spotter-tx-cell-msg-len branch August 1, 2025 22:55
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.

4 participants