Skip to content

fix: increase kMaxUriBytes from 30 to 64 for ohNet 1.40 IPv6 support#7

Open
kylegordon wants to merge 1 commit into
openhome:masterfrom
kylegordon:fix/ohm-max-uri-bytes-ipv6
Open

fix: increase kMaxUriBytes from 30 to 64 for ohNet 1.40 IPv6 support#7
kylegordon wants to merge 1 commit into
openhome:masterfrom
kylegordon:fix/ohm-max-uri-bytes-ipv6

Conversation

@kylegordon

Copy link
Copy Markdown
Contributor

Problem

ohNet 1.40 changed TIpAddress from a plain uint32_t to a struct with
IPv6 support, and bumped Endpoint::kMaxEndpointBytes from ~21 to 48.

OhmSender calls AppendEndpoint() on iUri (a Bws<kMaxUriBytes>)
after writing the 6-byte scheme prefix (ohm:// or ohu://), leaving
only 24 bytes of remaining capacity. AppendEndpoint() asserts:

ASSERT(aEndpoint.MaxBytes() - aEndpoint.Bytes() >= kMaxEndpointBytes);
// 24 >= 48  → always fails

This causes an AssertionFailed crash in the DeviceListUpdater thread
on startup whenever a Songcast sender is created.

Fix

Increase kMaxUriBytes to 64: 6 bytes (scheme prefix) + 48 bytes
(Endpoint::kMaxEndpointBytes) + 10 bytes margin.

Test

Verified by running against a live network with multiple Linn Receiver
devices — senders now create and start without crashing.

ohNet 1.40 changed TIpAddress from a plain uint32 to a struct with IPv6
support and bumped Endpoint::kMaxEndpointBytes from ~21 to 48. OhmSender
calls AppendEndpoint() on iUri (a Bws<kMaxUriBytes>) after writing a
6-byte scheme prefix ("ohm://" or "ohu://"), leaving only 24 bytes of
capacity. AppendEndpoint() asserts remaining >= kMaxEndpointBytes (48),
so the assertion always fires on startup when a sender is created.

Increase kMaxUriBytes to 64: 6 (scheme) + 48 (max endpoint) + 10 margin.
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.

1 participant