Skip to content

fix: migrate OhmSender TIpAddress comparisons to TIpAddressUtils#8

Open
kylegordon wants to merge 2 commits into
openhome:masterfrom
kylegordon:fix/ohnet-1.40-tipaddress-migration
Open

fix: migrate OhmSender TIpAddress comparisons to TIpAddressUtils#8
kylegordon wants to merge 2 commits into
openhome:masterfrom
kylegordon:fix/ohnet-1.40-tipaddress-migration

Conversation

@kylegordon

Copy link
Copy Markdown
Contributor

Summary

ohNet 1.40 changed TIpAddress from a typedef'd uint32 to a struct (iFamily + iV4/iV6) to support IPv6 adapters. OhmSender.cpp still compared TIpAddress values with != 0 / operator!= and passed a raw TUint32 to Endpoint::SetAddress() / WriteUint32Be(), none of which compile against the new struct type.

This mirrors the migration ohNet itself made at its own call sites: replace direct comparisons with TIpAddressUtils::IsZero() / TIpAddressUtils::Equals(), and build TIpAddress values explicitly where a raw address integer was being passed around.

Companion fix to #7 (kMaxUriBytes) — both are needed to build ohSongcast against ohNet 1.40.

Test plan

  • Builds clean against ohNet 1.40 (previously failed with operator!=/SetAddress overload-resolution errors on TIpAddress)
  • Verified the same code fails to compile against ohNet 1.40 without this change, and compiles/links with it

ohNet 1.40 changed TIpAddress from a typedef'd uint32 to a struct
(iFamily + iV4/iV6) to support IPv6 adapters. Direct comparisons
against 0 and between TIpAddress values (operator!=), and passing a
raw TUint32 to Endpoint::SetAddress()/WriteUint32Be(), no longer
compile. Replace with TIpAddressUtils::IsZero()/Equals() and build
TIpAddress values explicitly, matching the migration ohNet itself
made to its own call sites.
ohNet 1.40 changed TIpAddress from a typedef'd uint32 to a struct
(iFamily + iV4/iV6). HandleSlave() directly initialised a TIpAddress
from the raw TUint read off the wire, which no longer compiles
against the new struct type. Read the raw value separately and build
the TIpAddress explicitly, matching the migration already applied to
OhmSender.cpp in this PR.
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