-
Notifications
You must be signed in to change notification settings - Fork 8.4k
settings: fix key-value duplication check #12026
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
settings: fix key-value duplication check #12026
Conversation
carlescufi
left a comment
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.
LGTM
|
Gives me these build warnings: |
|
@nvlsianpu this solves the issue I had with mesh_shell, thanks for fixing it! I'll wait for the compilation warnings to be fixed before approving, though. |
jhedberg
left a comment
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.
Giving my approval so that this can be merged as soon as @nvlsianpu fixes the build warnings (which are now also causing CI to fail).
Whenever a new key-value is about to be stored, the settings perform check whether the value really changes. This check after zephyrproject-rtos#9521 patch should work differently as `\0` is not the value terminator anymore. Because of above any value which starts from \0 will be treated mistakenly as a NULL. This patch uses check-length callback instead read-callback which fix the issue and simplify the code a little. Signed-off-by: Andrzej Puzdrowski <[email protected]>
58116fa to
aa37f35
Compare
|
@nvlsianpu any update on fixing the compilation warnings? It'd good to get this merged ASAP. |
Codecov Report
@@ Coverage Diff @@
## master #12026 +/- ##
=========================================
- Coverage 48.05% 47.96% -0.1%
=========================================
Files 281 281
Lines 43412 43399 -13
Branches 10404 10403 -1
=========================================
- Hits 20863 20815 -48
- Misses 18400 18432 +32
- Partials 4149 4152 +3
Continue to review full report at Codecov.
|
|
@jhe green now |
Whenever a new key-value is about to be stored, the settings
perform check whether the value really changes. This check
after #9521 patch should work differently as
\0is notthe value terminator anymore. Because of above any value which
starts from \0 will be treated mistakenly as a NULL.
This patch uses check-length callback instead read-callback which
fix the issue and simplify the code a little.
Signed-off-by: Andrzej Puzdrowski [email protected]