-
Notifications
You must be signed in to change notification settings - Fork 1.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
[dataset-manager] apply partial dataset config on channel set failure #10490
Conversation
Size Report of OpenThread
|
src/core/meshcop/dataset_manager.cpp
Outdated
@@ -199,8 +199,7 @@ Error DatasetManager::ApplyConfiguration(const Dataset &aDataset) const | |||
|
|||
if (error != kErrorNone) | |||
{ | |||
LogWarn("ApplyConfiguration() Failed to set channel to %d (%s)", channel, ErrorToString(error)); | |||
ExitNow(); | |||
LogWarn("Failed to set channel to %u when applying dataset: %s", channel, ErrorToString(error)); |
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.
What about LogCrit()
here? LogWarn is normally pretty mild like e.g. failing to send a particular message (which can be easily retried) or not able to store some extra items. While this error is critical: the dataset defines a channel that the device can't support, and that's pretty final. (Typically hardcoded in the platform in the supported-channels mask.) So the entire Thread device can't operate anymore as part of the network, on the intended channel.
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.
Thanks @EskoDijk . I think using LogCrit()
can be useful. Updated in new push.
This commit updates `DatasetManager::ApplyConfiguration()` to apply the rest of the parameters in the Dataset even if setting the channel fails. The channel error is now logged as `LogCrit()`.
295c9d0
to
a2f70e5
Compare
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.
Ok, looks good now!
This commit updates
DatasetManager::ApplyConfiguration()
to apply the rest of the parameters in the Dataset even if setting the channel fails.