Skip to content
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

Remove int cast from ParseValueWithType value argument #7850

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

jmartinez-silabs
Copy link
Member

Problem

The parsing of zcl commands keys, for example zcl NetworkCommissioning AddThreadNetwork and zcl NetworkCommissioning EnableNetwork fails due to a wrong cast.

 File "/home/ubuntu/connectedhomeip/out/python_env/bin/chip-device-ctrl", line 133, in FormatZCLArguments
    commandArgs[key] = ParseValueWithType(int(value), valueType)
ValueError: invalid literal for int() with base 10: 'hex:0e080000000000000000000300000b35060004001fffe00208dead00beef00cafe0708fddead00beef00000510aa07f8a9b0a93b1ededc340e97df803b030a4f70656e5468726561640102cd53041024a811ad6fbab60d97de6176db21ebcb0c040
invalid literal for int() with base 10: 'hex:0e080000000000000000000300000b35060004001fffe00208dead00beef00cafe0708fddead00beef00000510aa07f8a9b0a93b1ededc340e97df803b030a4f70656e5468726561640102cd53041024a811ad6fbab60d97de6176db21ebcb0c040

This issue was, I think, mistakenly added in #7780

Change overview

In Function FormatZCLArguments, remove the int cast from ParseValueWithType Value argument.
The Cast is done inside the function if the given type is a int and should not be done for other types anyway.

Testing

Rebuilt the controller and completed the comissioning flow

@mspang mspang merged commit e90858e into project-chip:master Jun 24, 2021
@jmartinez-silabs jmartinez-silabs deleted the chipCtrl_cast_fix branch July 5, 2021 20:59
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants