-
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
[BUG] LocalizationConfiguration implementation overwrite ActiveLocale value on initialization. #28357
Labels
Comments
yonko-gospodinov
changed the title
[BUG] LocalizationConfiguration implementation ovetwrite ActiveLocale value on initialization.
[BUG] LocalizationConfiguration implementation overwrite ActiveLocale value on initialization.
Jul 28, 2023
bzbarsky-apple
added a commit
to bzbarsky-apple/zap
that referenced
this issue
Sep 1, 2023
See project-chip/connectedhomeip#28357: we are not mutating the actual value the caller will observe.
@yonko-gospodinov thank you for finding that, an I am sorry this took so long to get to: it got the "darwin" label auto-added, and I had not been triaging those issues, so just noticed this... This needs to be fixed on the ZAP side. Created project-chip/zap#1122 to fix that there, then we'll need to update ZAP version. |
brdandu
pushed a commit
to project-chip/zap
that referenced
this issue
Sep 1, 2023
* Fix accessor signatures for string/octstr attributes. See project-chip/connectedhomeip#28357: we are not mutating the actual value the caller will observe. * Address review comment.
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this issue
Sep 1, 2023
The old signature did not propagate the update length of the span to the caller. Fixes project-chip#28357
mergify bot
pushed a commit
that referenced
this issue
Sep 1, 2023
The old signature did not propagate the update length of the span to the caller. Fixes #28357
abpoth
pushed a commit
to abpoth/connectedhomeip
that referenced
this issue
Sep 12, 2023
…ct-chip#29024) The old signature did not propagate the update length of the span to the caller. Fixes project-chip#28357
HunsupJung
pushed a commit
to HunsupJung/connectedhomeip
that referenced
this issue
Oct 23, 2023
…ct-chip#29024) The old signature did not propagate the update length of the span to the caller. Fixes project-chip#28357
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction steps
I'm developing a Matter bridge and there for the LocalizationConfiguration::ActiveLocale attribute is set as external. Current active locale of the system is en-US and supported locales are: it-IT, de-DE, en-US, es-ES, fr-FR and en-GB.
Bug prevalence
On every system start.
GitHub hash of the SDK that was being used
8f66f42 (tag: v1.1.0.1)
Platform
darwin
Platform Version(s)
No response
Anything else?
During initialization, the emberAfLocalizationConfigurationClusterServerInitCallback function in localization-configuration-server.cpp is called. This function gets the active locale value and check if it is part of the supported locales. If it is not, set the first supported locale as active locale. This logic is triggered every time, because ActiveLocale::Get fail to set the correct size of the locale and outLocale.data_equal(activeLocale) always return false.
The definition of ActiveLocale::Get is:
EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string
there for calling:
value.reduce_size(length);
do not have the expected effect.
Change the definition of ActiveLocale::Get to:
EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string
is fixing the problem.
The text was updated successfully, but these errors were encountered: