-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[mdns/srp] Implemented delayed mDNS platform initialization #10222
[mdns/srp] Implemented delayed mDNS platform initialization #10222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Is it possible to add any unit tests to hostname generation and MAC address getter?
- Please handle both 48 and 64 bits MAC addresses properly
f047caf
to
b24e3bd
Compare
|
89d742d
to
0c234a7
Compare
0c234a7
to
b41a065
Compare
PR #10222: Size comparison from 89d742d to 9ea2cc4 2 builds
|
The Mdns module doesn't wait for SRP platform to be initialized and ready to operate before requesting adding/removing services. SRP platform needs to remove on init all old services associated with the host. * Removed assigning mMdnsInitialized=true in DiscoveryImplPlatform::Init() method, to be sure that DiscoveryImplPlatform always waits for platform to be ready and signal it by calling HandleMdnsInit callback * Removed stopping services in DiscoveryImplPlatform::Start() method, as it is already done one step earlier by StopPublishDevice() method * Added kMdnsPlatformInitialized CHIP event informing that mDNS platform is initalized and posted event in HandleMdnsInit callback * Added OnPlatformEvent in Mdns.cpp that handles kMdnsPlatformInitialized and restarts advertising * Added removing SRP host and services on SRP platform init * Renamed FillMAC method to GetPrimaryMACAddress and moved it to the ConfigurationMgr, as it is useful also for src/lib/mdns and src/platform modules that should not use app/server API. * Bump OpenThread repo version * Bump OTBR-posix repo version
b41a065
to
33b5e13
Compare
Size increase report for "gn_qpg-example-build" from d48d754
Full report output
|
Size increase report for "nrfconnect-example-build" from d48d754
Full report output
|
Size increase report for "esp32-example-build" from d48d754
Full report output
|
@tcarmelveilleux could you re-review it and resolve comments if no further requests? |
Problem
The Mdns module doesn't wait for SRP platform to be initialized and ready to operate before requesting adding/removing services. SRP platform needs to remove on init all old services associated with the host.
Change overview
mMdnsInitialized=true
inDiscoveryImplPlatform::Init()
method, to be sure thatDiscoveryImplPlatform
always waits for platform to be ready and signal it by callingHandleMdnsInit
callbackDiscoveryImplPlatform::Start()
method, as it is already done one step earlier byStopPublishDevice()
methodkMdnsPlatformInitialized
CHIP event informing that mDNS platform is initalized and posted event inHandleMdnsInit
callbackOnPlatformEvent
in Mdns.cpp that handleskMdnsPlatformInitialized
and restarts advertisingFillMAC
method toGetPrimaryMACAddress
and moved it to theConfigurationMgr
, as it is useful also for src/lib/mdns and src/platform modules that should not use app/server API.Testing
Tested manually for: