mirror of
https://github.com/espressif/openthread.git
synced 2026-07-10 06:10:21 +00:00
5b2bcee271
This commit enhances the `Srp::Client` "single service mode". This mode is enabled when a prepared SRP update message exceeds the IPv6 MTU size. In this mode, the client registers its services one by one, with each SRP update containing only a single service. The implementation is simplified by changing the `mSingleServiceMode` flag from a persistent member variable of the `Client` class to a field within the `MsgInfo` struct, making its scope message-specific. State transitions are now correctly applied to host and service entries when operating in single service mode. This, in turn, helps ensure that SRP message transaction IDs are managed correctly: the same ID is used for retries of an unchanged service, while a new ID is used if the service information has changed. Finally, a new test case, `TestSrpClientSingleServiceMode`, is added to `test_srp_server` to cover this behavior and its associated retry logic in detail.