mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[notifier] always signal changed state/config for the first time (#2818)
This commit adds new logic in `Notifier` class (and how it is used) to ensure when state/configuration is changed, each of the OT_CHANGED_* events (e.g., channel, network name) is signaled for the first time (even in case new set value is same as before). This change addresses an issue where if user sets a parameter (using OpenThread public APIs) before starting Thread operation the event indicating the change would not be emitted. This commit also defines `otChangedFlags` and `Notifier::Flags` types, and updates the logging in `Notifier` to use `String` class.
This commit is contained in:
committed by
Jonathan Hui
parent
d5797546e1
commit
9ce38e0161
+3
-3
@@ -3478,7 +3478,7 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
void OTCALL Interpreter::s_HandleNetifStateChanged(uint32_t aFlags, void *aContext)
|
||||
void OTCALL Interpreter::s_HandleNetifStateChanged(otChangedFlags aFlags, void *aContext)
|
||||
{
|
||||
#ifdef OTDLL
|
||||
otCliContext *cliContext = static_cast<otCliContext *>(aContext);
|
||||
@@ -3489,9 +3489,9 @@ void OTCALL Interpreter::s_HandleNetifStateChanged(uint32_t aFlags, void *aConte
|
||||
}
|
||||
|
||||
#ifdef OTDLL
|
||||
void Interpreter::HandleNetifStateChanged(otInstance *mInstance, uint32_t aFlags)
|
||||
void Interpreter::HandleNetifStateChanged(otInstance *mInstance, otChangedFlags aFlags)
|
||||
#else
|
||||
void Interpreter::HandleNetifStateChanged(uint32_t aFlags)
|
||||
void Interpreter::HandleNetifStateChanged(otChangedFlags aFlags)
|
||||
#endif
|
||||
{
|
||||
VerifyOrExit((aFlags & OT_CHANGED_THREAD_NETDATA) != 0);
|
||||
|
||||
Reference in New Issue
Block a user